You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Order ESXi using SoftLayer::BareMetalServerOrder_Package using the wrong vlan #92
Hello,
I'm using SoftLayer::BareMetalServerOrder_Package to order ESXi and it works fine except I don't see the option to specify public and private vlans that I would like the server to join. I see the options to specify private_vlan_id and public_vlan_id in BareMetalServerOrder. Is it possible to do something similar for BareMetalServerOrder_Package?
Thanks.
It must be possible as the createObject mechanism used by BareMetalServerOrder just uses the same package-based mechanism in implementation. Let me do some research and I will get back with you.
OK. I spoke with an engineer who was able to offer guidance. The technique is pretty straightforward.
When putting together the order that is sent to placeOrder you need to modify the hardware template provided so that it includes a reference to the id of the VLAN you want to set on the device.
You can modify the order template by passing a block to verify or place_order!. That block will be handed the order template and should return a modified template so something like this may work (though realize this was typed into GitHub, and has not gone through Ruby yet:
bms_order = SoftLayer::BareMetalServerOrder_Package.new()
bms_order.package = # some product package
bms_order.hostname = # some host name
bms_order.domain = # some domain
add_lans = lambda { |order_template|
order_template['hardware'][0]['primaryBackendNetworkComponent'] = { "networkVlanId" => 12345 }
order_template
}
bms_order.verify(&add_lans)
bms_order.place_order!(&add_lans)
Thanks. I got it to work with your suggestion. I think it would be great to enhance the API to have vlan as SoftLayer::BareMetalServerOrder_Package attribute.
Activity
SLsthompson commentedon Apr 9, 2015
It must be possible as the createObject mechanism used by BareMetalServerOrder just uses the same package-based mechanism in implementation. Let me do some research and I will get back with you.
bttong commentedon Apr 13, 2015
Hi sthompson,
I'm wondering if you have any update regarding this issue.
SLsthompson commentedon Apr 13, 2015
I've not received word back from the email I sent. Let me track down the person and ask them directly.
SLsthompson commentedon Apr 13, 2015
OK. I spoke with an engineer who was able to offer guidance. The technique is pretty straightforward.
When putting together the order that is sent to
placeOrderyou need to modify the hardware template provided so that it includes a reference to theidof the VLAN you want to set on the device.It's going to look something like this:
You can modify the order template by passing a block to
verifyorplace_order!. That block will be handed the order template and should return a modified template so something like this may work (though realize this was typed into GitHub, and has not gone through Ruby yet:bttong commentedon Apr 13, 2015
Thanks a lot. I will give it a try.
bttong commentedon Apr 14, 2015
Thanks.
bttong commentedon Apr 14, 2015
Thanks. I got it to work with your suggestion. I think it would be great to enhance the API to have vlan as SoftLayer::BareMetalServerOrder_Package attribute.
ju2wheels commentedon Apr 15, 2015
@bttong ive added them to both the VirtualServer and BareMetalServer order package wrappers.