one icon indicating copy to clipboard operation
one copied to clipboard

oneprovider create creates wrong template

Open OpenNebulaSupport opened this issue 3 years ago • 0 comments

Description There are some issues when creating a provider using oneprovider create. The issues were tested with the oneprem provider.

  1. After the provider is created, when creating provision, the provider is not shown in the provider list in Fireedge Provision
  2. The provider cannot be edited in Fireedge Provision. Throws internal error.

To Reproduce

Issue1

oneprovider create /usr/share/one/oneprovision/edge-clusters/metal/providers/onprem/onprem.yml

image image image

Issue2

image image

Expected behavior Fireedge can edit a CLI created provider and the provider should be selectable when creating provisions.

Details

  • Version: 6.4.1

Additional context

When comapring the same provider created on CLI vs created on Fireedge (which works as expected). There are some differences on its template

CLI

  <TEMPLATE>
    <PLAIN><![CDATA[{"provider":"onprem"}]]></PLAIN>
    <PROVISION_BODY><![CDATA[{"provider":"onprem","connection":null,"registration_time":1659629357,"name":"onprem","description":"On Premises datacenter infrastructure"}]]></PROVISION_BODY>
  </TEMPLATE>

Fireedge

  <TEMPLATE>
    <PLAIN><![CDATA[{"provision_type":"metal","provider":"onprem"}]]></PLAIN>
    <PROVISION_BODY><![CDATA[{"provider":"onprem","connection":{},"registration_time":1659628287,"name":"onprem","description":"On Premises datacenter infrastructure"}]]></PROVISION_BODY>
  </TEMPLATE>

With "connection":{} replacing "connection":null Issue1 is solved. This can be fixed by adding it to the yaml. Even though this is missing, the existence of it is supposed to be validated here.

Workaround: onetemplate update <template_id> for issue1 and for issue2 append --plain.

Progress Status

  • [ ] Code committed
  • [ ] Testing - QA
  • [ ] Documentation (Release notes - resolved issues, compatibility, known issues)

OpenNebulaSupport avatar Aug 04 '22 16:08 OpenNebulaSupport