Python SDK - Azure Resource Manager issue - instance

Last post 09-17-2019, 12:00 PM by ErikThom. 0 replies.
Sort Posts: Previous Next
  • Python SDK - Azure Resource Manager issue - instance
    Posted: 09-17-2019, 12:00 PM


    Has anyone any experience using the Python SDK in Azure?

    Can anyone see what I am doing wrong in the code below regarding the instance?

    I am able to print out agent.instances


    from cvpysdk.commcell import Commcell

    commcell = Commcell('ethsbk002', '_py', '*correctpassword*')

    client = commcell.clients.get('erikthomv2')

    agent = client.agents.get('virtual server')


    "Virtual Server" Agent instance for Client: "erikthomv2"
    instance = agent.instances
    S. No.	      Instance      	       Agent        	       Client       
      1  	azure resource manager	virtual server      	erikthomv2
    instance = agent.instances.get('azure resource manager')
    SDKException                              Traceback (most recent call last)
    <ipython-input-12-73da3d07c73f> in <module>
    ----> 1instance = agent.instances.get('azure resource manager')
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in get(self, instance_name)
     376                         instance = self._instances_dict[agent_name]
     377                     return instance(
    --> 378self._agent_object, instance_name, self._instances[instance_name]
     379                     )
     380                 else:
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\instances\virtualserver\ in __init__(self, agent, name, iid)
    ---> 57super(VirtualServerInstance, self).__init__(agent, name, iid)
     58         self._vendor_id = 7
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in __init__(self, agent_object, instance_name, instance_id)
     1166         self.backupsets = None
     1167         self.subclients = None
    -> 1168self.refresh()
     1170     def _get_instance_id(self):
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in refresh(self)
     2204         self._get_instance_properties()
    -> 2205self.backupsets = Backupsets(self)
     2206         self.subclients = Subclients(self)
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in __init__(self, class_object)
     193         self._backupsets = None
     194         self._default_backup_set = None
    --> 195self.refresh()
     197     def __str__(self):
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in refresh(self)
     607     def refresh(self):
     608         """Refresh the backupsets associated with the Agent / Instance."""
    --> 609self._backupsets = self._get_backupsets()
     611     @property
    c:\program files\python36\lib\site-packages\cvpysdk-11.17-py3.6.egg\cvpysdk\ in _get_backupsets(self)
     322                 return return_dict
     323             else:
    --> 324raise SDKException('Response', '102')
     325         else:
     326             raise SDKException('Response', '101', self._update_response_(response.text))
    SDKException: Response received is empty



The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy