VMware Cloud Community
FTVDaniel
Contributor
Contributor
Jump to solution

create multiple orchestrator configuration elements

Hello,

I try to automate the création of ElementCategory but cannot find the way to do it

the aim is to add networks configuration parameters in a category path called network

network

element 1     element 2       ....

name            name

elementref    elementref

range            range

gateway        gateway

...

I have seen actions to create attributes on existing elements but not actions to create an element in a cofigurationElementPath

I have seen WF to import elements but the vco server must be a remote one I have only one vco server

does someone have an idea on how to create elements ?

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Right, this method was added in 7.0, if I recall correctly.

View solution in original post

0 Kudos
4 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

It can be done with one of the following code snippets (assuming you have your configuration element category either as a string path or as an instance of type ConfigurationElementCategory)

var myConfigElement = Server.createConfigurationElement( "config/path/to/myelement", "myElementName" );

or

var myConfigElementCategory = ...; // object of type ConfigurationElementCategory representing your category

var myConfigElement = Server.createConfigurationElement( myConfigElementCategory, "myElementName" );

0 Kudos
FTVDaniel
Contributor
Contributor
Jump to solution

Hi Ilian,

unfortunatly I have an error message "TypeError: Cannot find default value for object. (Workflow:test / Scriptable task (item2)#2)"

with both codes

perhaps I have a too old orchestrator version I have 5.5.3 ?

in API explorer I do not see Server.createConfigurationElement

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

Right, this method was added in 7.0, if I recall correctly.

0 Kudos
FTVDaniel
Contributor
Contributor
Jump to solution

ok thanks Ilian,

need to wait update of our infra to 6.x so, before going further

0 Kudos