(POOLER-166) Vmpooler should check DNS to ensure a record does not exist before VM creation

initial draft
This commit is contained in:
Samuel Beaulieu 2020-05-27 17:59:06 -05:00
parent 46af69f67b
commit 616db575f8
5 changed files with 65 additions and 1 deletions

View file

@ -3312,6 +3312,16 @@ EOT
expect(subject.find_vm(poolname,missing_vm,connection)).to be_nil
end
it 'new test' do
expect(connection.searchIndex).to receive(:FindByInventoryPath).and_return(vm_object)
nic_a = MockGuestNicInfo.new()
nic_b = MockGuestNicInfo.new()
expect(vm_object.guest).to receive(:net).and_return([nic_a,nic_b])
expect(nic_a).to receive(:ipAddress).and_return(["192.168.0.1", "192.168.0.2"])
expect(nic_b).to receive(:ipAddress).and_return(["192.167.0.1"])
subject.get_all_ip_for_nics(poolname,missing_vm,connection)
end
end
describe '#get_base_vm_container_from' do