Module Expr Str Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Num Str Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Break Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Print Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Print Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body TryExcept body Assign NameStore NameLoad TryExcept body Print Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Num SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str keyword Str handlers ExceptHandler type NameLoad name NameStore body Pass Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Print Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad ListLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Print BinOpMod Str AttributeLoad NameLoad attr Return Num ExceptHandler type NameLoad name NameStore body Print BinOpMod Str Call NameLoad NameLoad Return Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
Copyright 2014-2015 Reubenur Rahman
All Rights Reserved
@author: reuben.13@gmail.com
 N/A atexit pyVmomi vim vmodl pyVim connect pyVim.connect Disconnect N/A inputs N/A vcenter_ip vcenter_password vcenter_user host_name switch_name num_ports nic_name port_group_name 15.22.10.11 Password123 Administrator 15.22.11.6 TestvSwitch 100 vmnic1 TestPortGroup get_obj N/A N/A content vimtype name N/A N/A N/A 
     Get the vsphere object associated with a given text name
     N/A obj None N/A container N/A N/A N/A content viewManager CreateContainerView N/A content rootFolder vimtype True N/A c N/A container view N/A N/A N/A N/A c name name N/A N/A obj c N/A N/A obj N/A create_vswitch N/A N/A host_network_system vss_name num_ports nic_name N/A N/A N/A vss_spec N/A N/A N/A N/A vim host VirtualSwitch Specification N/A N/A vss_spec numPorts num_ports N/A N/A vss_spec bridge N/A N/A N/A N/A vim host VirtualSwitch BondBridge nicDevice N/A nic_name N/A N/A N/A host_network_system AddVirtualSwitch vswitchName vss_name spec vss_spec N/A Successfully created vSwitch  vss_name N/A create_port_group N/A N/A host_network_system pg_name vss_name N/A N/A N/A port_group_spec N/A N/A N/A N/A vim host PortGroup Specification N/A N/A port_group_spec name pg_name N/A N/A port_group_spec vlanId 0 N/A N/A port_group_spec vswitchName vss_name N/A security_policy N/A N/A N/A N/A vim host NetworkPolicy SecurityPolicy N/A N/A security_policy allowPromiscuous True N/A N/A security_policy forgedTransmits True N/A N/A security_policy macChanges False N/A N/A port_group_spec policy N/A N/A N/A vim host NetworkPolicy security security_policy N/A N/A N/A host_network_system AddPortGroup portgrp port_group_spec N/A Successfully created PortGroup  pg_name N/A add_virtual_nic N/A N/A host_network_system pg_name N/A N/A N/A vnic_spec N/A N/A N/A N/A vim host VirtualNic Specification N/A N/A vnic_spec ip N/A N/A N/A vim host IpConfig dhcp True N/A N/A vnic_spec mac 00:50:56:7d:5e:0b N/A N/A N/A host_network_system AddServiceConsoleVirtualNic portgroup pg_name nic vnic_spec N/A main N/A N/A N/A N/A N/A N/A N/A si None N/A N/A N/A Trying to connect to VCENTER SERVER . . . N/A si N/A N/A connect Connect N/A inputs N/A vcenter_ip 443 N/A inputs N/A vcenter_user N/A inputs N/A vcenter_password version vim.version.version8 N/A N/A N/A IOError N/A e N/A N/A N/A N/A N/A atexit register Disconnect si N/A Connected to VCENTER SERVER ! N/A content N/A N/A si RetrieveContent N/A host N/A get_obj content N/A N/A vim HostSystem N/A inputs N/A host_name N/A host_network_system N/A N/A host configManager networkSystem N/A N/A create_vswitch host_network_system N/A inputs N/A switch_name N/A inputs N/A num_ports N/A inputs N/A nic_name N/A N/A create_port_group host_network_system N/A inputs N/A port_group_name N/A inputs N/A switch_name N/A N/A N/A N/A vmodl MethodFault N/A e N/A N/A N/A Caught vmodl fault: %s N/A e msg N/A 1 N/A N/A Exception N/A e N/A N/A N/A Caught exception: %s N/A str e N/A 1 N/A N/A N/A __name__ __main__ N/A N/A N/A main