Module Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias If Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore BinOpAdd NameLoad Call NameLoad NameLoad Assign NameStore NameLoad For NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If BoolOpAnd Call NameLoad NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body 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 defaults Str body Expr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Raise Call NameLoad Call AttributeLoad Str attr NameLoad While NameLoad body Print BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad attr If BoolOpAnd CompareIsNot NameLoad NameLoad CompareEq NameLoad Str body Return SubscriptLoad NameLoad Index NameLoad orelse If CompareIn NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad orelse Print Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Print Call AttributeLoad Str attr AttributeLoad NameLoad attr orelse Print Str decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A atexit N/A requests tools cli pyVmomi vim pyVim.connect SmartConnect Disconnect tools tasks N/A N/A hasattr N/A N/A requests packages urllib3 disable_warnings N/A N/A N/A N/A N/A N/A requests packages urllib3 disable_warnings delete_virtual_disk N/A N/A si vm_obj disk_number N/A N/A N/A  Deletes virtual Disk based on disk number
    :param si: Service Instance
    :param vm_obj: Virtual Machine Object
    :param disk_number: Hard Disk Unit Number
    :return: True if success
     N/A hdd_prefix_label Hard disk  N/A hdd_label N/A hdd_prefix_label N/A str disk_number N/A virtual_hdd_device None N/A dev N/A N/A N/A vm_obj config hardware device N/A N/A N/A N/A isinstance dev N/A N/A N/A vim vm device VirtualDisk N/A N/A N/A dev deviceInfo label hdd_label N/A N/A virtual_hdd_device dev N/A N/A virtual_hdd_device N/A N/A N/A RuntimeError N/A N/A Virtual {} could not be found. format virtual_hdd_device N/A virtual_hdd_spec N/A N/A N/A N/A vim vm device VirtualDeviceSpec N/A N/A virtual_hdd_spec operation N/A N/A N/A N/A N/A vim vm device VirtualDeviceSpec Operation remove N/A N/A virtual_hdd_spec device virtual_hdd_device N/A spec N/A N/A N/A vim vm ConfigSpec N/A N/A spec deviceChange N/A virtual_hdd_spec N/A task N/A N/A vm_obj ReconfigVM_Task spec spec N/A N/A N/A tasks wait_for_tasks si N/A task N/A True N/A get_args N/A N/A N/A N/A N/A parser N/A N/A cli build_arg_parser N/A N/A N/A parser add_argument -n --vmname required True help Name of the VirtualMachine you want to change. N/A N/A N/A parser add_argument -m --unitnumber required True help HDD number to delete. type int N/A N/A N/A parser add_argument -y --yes help Confirm disk deletion. action store_true N/A my_args N/A N/A parser parse_args N/A N/A N/A cli prompt_for_password my_args N/A get_obj N/A N/A content vim_type name N/A N/A N/A obj None N/A container N/A N/A N/A content viewManager CreateContainerView N/A content rootFolder vim_type 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 prompt_y_n_question N/A N/A question default N/A no N/A N/A  based on:
        http://code.activestate.com/recipes/577058/
    :param question: Question to ask
    :param default: No
    :return: True/False
     N/A valid N/A yes y ye no n True True True False False N/A N/A default None N/A N/A prompt  [y/n]  N/A N/A N/A default yes N/A N/A prompt  [Y/n]  N/A N/A N/A default no N/A N/A prompt  [y/N]  N/A N/A N/A ValueError N/A N/A Invalid default answer: '{}' format default N/A True N/A N/A N/A question prompt N/A choice N/A N/A N/A raw_input lower N/A N/A N/A default None N/A choice N/A N/A N/A valid N/A default N/A N/A N/A choice valid N/A N/A N/A valid N/A choice N/A N/A Please, respond with 'yes' or 'no' or 'y' or 'n'. N/A main N/A N/A N/A N/A N/A args N/A get_args N/A si N/A SmartConnect host N/A args host user N/A args user pwd N/A args password port N/A args port N/A N/A N/A atexit register Disconnect si N/A content N/A N/A si RetrieveContent N/A N/A N/A Searching for VM {} format N/A args vmname N/A vm_obj N/A get_obj content N/A N/A vim VirtualMachine N/A args vmname N/A vm_obj N/A N/A N/A N/A args yes N/A N/A N/A N/A cli prompt_y_n_question N/A N/A Are you sure you want to delete HDD {}? format N/A args unitnumber default no N/A N/A delete_virtual_disk si vm_obj N/A args unitnumber N/A N/A N/A VM HDD "{}" successfully deleted. format N/A args unitnumber N/A N/A VM not found N/A N/A N/A __name__ __main__ N/A N/A N/A main