mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ibm] Add vlan_id attrib so that it can be used in creating an instance
This commit is contained in:
parent
5620ac760f
commit
3c3c6d5b2e
1 changed files with 5 additions and 1 deletions
|
@ -46,6 +46,7 @@ module Fog
|
|||
attribute :software
|
||||
attribute :state, :aliases => 'status'
|
||||
attribute :volume_ids, :aliases => 'volumes'
|
||||
attribute :vlan_id, :aliases => 'vlanID'
|
||||
|
||||
def initialize(new_attributes={})
|
||||
super(new_attributes)
|
||||
|
@ -58,7 +59,10 @@ module Fog
|
|||
|
||||
def save
|
||||
requires :name, :image_id, :instance_type, :location_id
|
||||
data = connection.create_instance(name, image_id, instance_type, location_id, :key_name => key_name)
|
||||
data = connection.create_instance(name, image_id, instance_type, location_id,
|
||||
:key_name => key_name,
|
||||
:vlan_id => vlan_id,
|
||||
:secondary_ip => secondary_ip)
|
||||
data.body['instances'].each do |iattrs|
|
||||
if iattrs['name'] == name
|
||||
merge_attributes(iattrs)
|
||||
|
|
Loading…
Add table
Reference in a new issue