Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

_get_client_properties() Doesn't Return Anything #84

Closed RLR-NDH closed 5 years ago

RLR-NDH commented 5 years ago

The "_get_client_properties() – get the properties of this client" doesn't return anything. If I add something like client_properties_dict = { "client_name": self._client_name, "client_id": self._client_id, "instance": self._instance
}

            return client_properties_dict

Then is does. Is this what it is supposed to do?

RLR-NDH commented 5 years ago

The "_get_client_properties() – get the properties of this client" doesn't return anything. If I add

            client_properties_dict = {
                "properties": self._properties
            }

            return client_properties_dict

Then is produces something usable. Is this what it is supposed to do?


ClientPropertiesObject = ClientObject._get_client_properties() <class 'dict'> dumpcleanv(ClientPropertiesObject) dict: k = [properties] => dict: k = [vmStatusInfo] => dict: k = [vmBackupJob] => v = [0] k = [vendor] => v = [4] k = [subclientId] => v = [13] k = [name] => obj: => [i-0e5892c7d664b4b50] k = [strGUID] => obj: => [i-0e5892c7d664b4b50] k = [subclientName] => obj: => [default] k = [pseudoClient] => dict: k = [clientId] => v = [5] k = [clientName] => obj: => [Amazon] k = [vsaSubClientEntity] => dict:

Vairavaprakash commented 5 years ago

Hi RLR-NDH,

_get_client_properties() is a private method and it's not recommended to use private methods

If you need client properties, please make use of properties getter

https://github.com/CommvaultEngg/cvpysdk/blob/master/cvpysdk/client.py#L1897

Regards Vairavaprakash