Automatic set VLAN (SOLVED)

I trying to provisioning a virtual machin with the minimal interaction from the user, but at this time I can’t do to the mangeIQ set automatically a VLAN.

That’s possible?

Environment:
MangeIQ master.20140805122641_6faf9a3
VMware vCenter 5.5
12x VLANs

The miq_provision object in automate supports both set_vlan and set_dvs methods. You need to pass the name of the device you want to use.

1 Like

I’m find for miq_provision, but I can’t found it.

You know where are?

I tried to find this information on google and the documentation, but no successful.

You can find it in the docs at: http://manageiq.org/documentation/
The doc is http://manageiq.org/pdf/ManageIQ-0-Methods_Available_for_Automation-en-US.pdf and the info starts around page 48.

1 Like

I understand the set_vlan, but set_dvs i can’t find more information about that!

In this document, I found for set_vlan, but nothing for set_dvs!
I’m find more information at the documents about that.

Tks bascar and gmccullough, you are very helpful!

I am not sure I understood you last post. The document does have set_dvs. I will include it here:

set_dvs(portgroup, switch = portgroup) #Set the name of the Distributed Virtual Switch
(portgroup).
An options name can also
be passed.
Example: miq_provision.set_dvs(‘default’)

Some examples I found:
http://www.marcoberube.com/archives/191

1 Like

I solved this using another way.

I just edited my workflow, changed “:display: :edit” to “:display: :hide”, and added “:default: <vlan_name>”

This way, on the dialog processes was not show the box to select vlan, because the vlan was set on the workflow.

If anyone wants to set this as an option in the dialog then you will want to specify 2 options

vlan=
portgroupName=

For me I had a vlan called dev_unix_129 when we introduced DVS we kept the portgroup name the same and this sat in a dvs called dev_server as you cant have the same portgroup name in multiple dvs the dvs name is actually not needed when passing the variables however I did notice during the workflow that my vlan changed when using dvs and the following was needed to automate it

vlan=dvs_dev_unix_129
portgroupName=dev_unix_129

Now going forward I just use the above in my environmental flow dialog method so when I select Development it will populate the 2 options above etc etc Hope this helps.