#NEWLINE# @ vcr . use_cassette ( 'vm_nic_data.yaml' , cassette_library_dir = tests . fixtures_path , record_mode = 'never' ) #NEWLINE# def test_vm_nic_data( self ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# 'ESXi-5.5-16' : [ ] , #NEWLINE# 'ESXi-5.5-17' : [ ] , #NEWLINE# 'ESXi-5.5-18' : [ ] , #NEWLINE# 'ESXi11' : [ '00:0c:29:e1:e0:f8' ] , #NEWLINE# 'ESXi12' : [ '00:50:56:b4:3c:3c' ] , #NEWLINE# 'ESXi20' : [ '00:50:56:b4:fc:9b' , '00:50:56:b4:28:e7' ] , #NEWLINE# 'ESXi21' : [ '00:50:56:b4:8d:7a' , '00:50:56:b4:39:b8' ] , #NEWLINE# 'ESXi22' : [ '00:0c:29:36:b5:5a' , '00:0c:29:36:b5:64' ] , #NEWLINE# 'ESXi23' : [ '00:50:56:b4:91:f9' , '00:50:56:b4:90:9f' ] , #NEWLINE# 'ESXi38-v5.0' : [ '00:0c:29:ce:6a:d8' , '00:0c:29:ce:6a:e2' ] , #NEWLINE# 'MARVEL-Agents_of_Atlas' : [ ] , #NEWLINE# 'MARVEL-Alex_Power' : [ ] , #NEWLINE# 'MARVEL-Archangel' : [ ] , #NEWLINE# 'MARVEL-Freak' : [ ] , #NEWLINE# 'MARVEL-Hepzibah' : [ ] , #NEWLINE# 'MARVEL-Mach_IV' : [ ] , #NEWLINE# 'MARVEL-Serpent_Society' : [ ] , #NEWLINE# 'MARVEL-Spectrum' : [ ] , #NEWLINE# 'MARVEL-The_Hand' : [ ] , #NEWLINE# 'MARVEL-Vanisher_(Ultimate)' : [ ] , #NEWLINE# 'VCVA-5.5u1-11' : [ '00:0c:29:9d:a3:8c' ] , #NEWLINE# 'VCVA-5.5u1-14' : [ '00:0c:29:75:21:2e' ] , #NEWLINE# 'VCVA33' : [ '00:0c:29:e3:f9:f7' ] , #NEWLINE# 'VCVA36' : [ '00:0c:29:44:8b:76' ] , #NEWLINE# 'VCVA37-v5.0' : [ '00:50:56:b4:89:db' ] , #NEWLINE# 'box' : [ '00:50:56:82:28:7d' ] , #NEWLINE# 'box_copy' : [ '00:50:56:82:34:02' ] , #NEWLINE# 'esx4.1.0' : [ '00:0c:29:1f:ec:ba' , '00:0c:29:1f:ec:c4' ] , #NEWLINE# #UNINDENT# } #NEWLINE# si = connect . SmartConnect ( host = 'vcsa' , user = 'my_user' , pwd = 'my_password' ) #NEWLINE# content = si . RetrieveContent ( ) #NEWLINE# virtual_machines = content . viewManager . CreateContainerView ( content . rootFolder , [ vim . VirtualMachine ] , True ) #NEWLINE# for virtual_machine in virtual_machines . view : #NEWLINE# #INDENT# name = virtual_machine . name #NEWLINE# self . assertTrue ( ( name in data . keys ( ) ) ) #NEWLINE# macs = data [ name ] #NEWLINE# if virtual_machine . guest : #NEWLINE# #INDENT# for net in virtual_machine . guest . net : #NEWLINE# #INDENT# self . assertTrue ( ( net . macAddress in macs ) )