lib/fog/vsphere/requests/compute/create_group.rb in fog-vsphere-1.4.0 vs lib/fog/vsphere/requests/compute/create_group.rb in fog-vsphere-1.5.0

- old
+ new

@@ -6,11 +6,11 @@ cluster = get_raw_cluster(attributes[:cluster], attributes[:datacenter]) group = cluster.configurationEx.group.find {|n| n[:name] == attributes[:name]} if group raise ArgumentError, "Group #{attributes[:name]} already exists!" end - spec = get_spec attributes + spec = get_group_spec attributes cluster_spec = RbVmomi::VIM.ClusterConfigSpecEx(groupSpec: [ RbVmomi::VIM.ClusterGroupSpec( operation: RbVmomi::VIM.ArrayUpdateOperation('add'), info: spec ) @@ -24,10 +24,10 @@ end end private - def get_spec(attributes={}) + def get_group_spec(attributes={}) if attributes[:type].to_s == 'ClusterVmGroup' vms = attributes[:vm_ids].to_a.map {|id| get_vm_ref(id, attributes[:datacenter])} attributes[:type].new( name: attributes[:name], vm: vms