mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Disable Naming/VariableName for propSpecs
I assume `propSpecs` is a reference to the VMWare API so using camelCase is intentional.
This commit is contained in:
parent
f85f5126e8
commit
b4f42cd4b1
1 changed files with 11 additions and 11 deletions
|
|
@ -132,11 +132,11 @@ module Vmpooler
|
||||||
def get_folder_children(folder_name, connection)
|
def get_folder_children(folder_name, connection)
|
||||||
folders = []
|
folders = []
|
||||||
|
|
||||||
propSpecs = {
|
propSpecs = { # rubocop:disable Naming/VariableName
|
||||||
entity: self,
|
entity: self,
|
||||||
inventoryPath: folder_name
|
inventoryPath: folder_name
|
||||||
}
|
}
|
||||||
folder_object = connection.searchIndex.FindByInventoryPath(propSpecs)
|
folder_object = connection.searchIndex.FindByInventoryPath(propSpecs) # rubocop:disable Naming/VariableName
|
||||||
|
|
||||||
return folders if folder_object.nil?
|
return folders if folder_object.nil?
|
||||||
|
|
||||||
|
|
@ -700,12 +700,12 @@ module Vmpooler
|
||||||
datacenter = get_target_datacenter_from_config(pool_name)
|
datacenter = get_target_datacenter_from_config(pool_name)
|
||||||
return nil if datacenter.nil?
|
return nil if datacenter.nil?
|
||||||
|
|
||||||
propSpecs = {
|
propSpecs = { # rubocop:disable Naming/VariableName
|
||||||
entity: self,
|
entity: self,
|
||||||
inventoryPath: "#{datacenter}/vm/#{folder}"
|
inventoryPath: "#{datacenter}/vm/#{folder}"
|
||||||
}
|
}
|
||||||
|
|
||||||
folder_object = connection.searchIndex.FindByInventoryPath(propSpecs)
|
folder_object = connection.searchIndex.FindByInventoryPath(propSpecs) # rubocop:disable Naming/VariableName
|
||||||
return nil unless folder_object.class == RbVmomi::VIM::Folder
|
return nil unless folder_object.class == RbVmomi::VIM::Folder
|
||||||
|
|
||||||
folder_object
|
folder_object
|
||||||
|
|
@ -891,12 +891,12 @@ module Vmpooler
|
||||||
get_snapshot_list(vm.snapshot.rootSnapshotList, snapshotname) if vm.snapshot
|
get_snapshot_list(vm.snapshot.rootSnapshotList, snapshotname) if vm.snapshot
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_propSpecs(datacenter, folder, vmname)
|
def build_propSpecs(datacenter, folder, vmname) # rubocop:disable Naming/MethodName
|
||||||
propSpecs = {
|
propSpecs = { # rubocop:disable Naming/VariableName
|
||||||
entity => self,
|
entity => self,
|
||||||
:inventoryPath => "#{datacenter}/vm/#{folder}/#{vmname}"
|
:inventoryPath => "#{datacenter}/vm/#{folder}/#{vmname}"
|
||||||
}
|
}
|
||||||
propSpecs
|
propSpecs # rubocop:disable Naming/VariableName
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_vm(pool_name, vmname, connection)
|
def find_vm(pool_name, vmname, connection)
|
||||||
|
|
@ -909,12 +909,12 @@ module Vmpooler
|
||||||
datacenter = get_target_datacenter_from_config(pool_name)
|
datacenter = get_target_datacenter_from_config(pool_name)
|
||||||
return nil if datacenter.nil?
|
return nil if datacenter.nil?
|
||||||
|
|
||||||
propSpecs = {
|
propSpecs = { # rubocop:disable Naming/VariableName
|
||||||
entity: self,
|
entity: self,
|
||||||
inventoryPath: "#{datacenter}/vm/#{folder}/#{vmname}"
|
inventoryPath: "#{datacenter}/vm/#{folder}/#{vmname}"
|
||||||
}
|
}
|
||||||
|
|
||||||
connection.searchIndex.FindByInventoryPath(propSpecs)
|
connection.searchIndex.FindByInventoryPath(propSpecs) # rubocop:disable Naming/VariableName
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_base_vm_container_from(connection)
|
def get_base_vm_container_from(connection)
|
||||||
|
|
@ -1035,12 +1035,12 @@ module Vmpooler
|
||||||
datacenter = get_target_datacenter_from_config(pool['name'])
|
datacenter = get_target_datacenter_from_config(pool['name'])
|
||||||
raise('cannot find datacenter') if datacenter.nil?
|
raise('cannot find datacenter') if datacenter.nil?
|
||||||
|
|
||||||
propSpecs = {
|
propSpecs = { # rubocop:disable Naming/VariableName
|
||||||
entity: self,
|
entity: self,
|
||||||
inventoryPath: "#{datacenter}/vm/#{pool['template']}"
|
inventoryPath: "#{datacenter}/vm/#{pool['template']}"
|
||||||
}
|
}
|
||||||
|
|
||||||
template_vm_object = connection.searchIndex.FindByInventoryPath(propSpecs)
|
template_vm_object = connection.searchIndex.FindByInventoryPath(propSpecs) # rubocop:disable Naming/VariableName
|
||||||
raise("Pool #{pool['name']} specifies a template VM of #{pool['template']} which does not exist for the provider #{name}") if template_vm_object.nil?
|
raise("Pool #{pool['name']} specifies a template VM of #{pool['template']} which does not exist for the provider #{name}") if template_vm_object.nil?
|
||||||
|
|
||||||
template_vm_object
|
template_vm_object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue