Skip to content

Commit

Permalink
11.36.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjojeejoseph committed Oct 28, 2024
1 parent fc14239 commit 4781f5d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cvpysdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
"""

__author__ = 'Commvault Systems Inc.'
__version__ = '11.36'
__version__ = '11.36.1'
3 changes: 3 additions & 0 deletions cvpysdk/backupset.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ def __init__(self, class_object):
if self._agent_object:
self._BACKUPSETS += '&applicationId=' + self._agent_object.agent_id

if self._instance_object:
self._BACKUPSETS += '&instanceId=' + self._instance_object.instance_id

if self._agent_object.agent_name in ['cloud apps', 'sql server', 'sap hana']:
self._BACKUPSETS += '&excludeHidden=0'

Expand Down
46 changes: 40 additions & 6 deletions cvpysdk/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@
refresh() -- refresh the properties of the instance
Instance Attributes
-----------------
**instance_id** -- returns the instance id
**instance_name** -- returns the instance name
**name** -- returns the instance display name
**properties** -- returns the properties of the instance
**subclients** -- returns the configured subclients for the instance
**backupsets** -- returns the backupsets associated with the instance
"""

from __future__ import absolute_import
Expand Down Expand Up @@ -1824,8 +1839,8 @@ def __init__(self, agent_object, instance_name, instance_id=None):
# Restore json instance var
self._commonopts_restore_json = {}

self.backupsets = None
self.subclients = None
self._backupsets = None
self._subclients = None
self.refresh()

def _get_instance_id(self):
Expand Down Expand Up @@ -2592,6 +2607,27 @@ def update_properties(self, properties_dict):
request_json['instanceProperties'].update(properties_dict)
self._process_update_request(request_json)

@property
def backupsets(self):
"""Returns the instance of the Backupsets class representing the list of Backupsets
installed / configured on the Client for the selected Instance.
"""
if self._backupsets is None:
from .backupset import Backupsets
self._backupsets = Backupsets(self)

return self._backupsets

@property
def subclients(self):
"""Returns the instance of the Subclients class representing the list of Subclients
installed / configured on the Client for the selected Instance.
"""
if self._subclients is None:
self._subclients = Subclients(self)

return self._subclients

@property
def properties(self):
"""Returns the instance properties"""
Expand Down Expand Up @@ -3099,8 +3135,6 @@ def _json_backup_subtasks(self):

def refresh(self):
"""Refresh the properties of the Instance."""
from .backupset import Backupsets

self._get_instance_properties()
self.backupsets = Backupsets(self)
self.subclients = Subclients(self)
self._backupsets = None
self._subclients = None

0 comments on commit 4781f5d

Please sign in to comment.