· 7 years ago · Mar 11, 2018, 10:06 AM
1Customer.cx
2 thisCustomer = Customer.find(:first)
3 thisCustomersVF=thisCustomer.virtual_fabrics.find_by_name(fabric)
4 myFabric=Vfci::Fabric.new(
5 :access_key => thisCustomersVF.access_key,
6 :secret_key => thisCustomersVF.secret_key,
7 :vf_type => fabric
8 )
9 # we actually need to be pulling the key from thisCustomersVF??? --Randy
10 mySshKey = opts[:keyname] ? opts[:keyname] : thisCustomersVF.ssh_keys.find_by_default(true).name.to_s
11
12 myNode=myFabric.new_node(
13 :image_id => opts[:image_id],
14 :uuid => opts[:node_id],
15 :keyname => mySshKey,
16 :userData => user_data
17 )