How to use the zhmcclient._utils.repr_manager function in zhmcclient

To help you get started, we’ve selected a few zhmcclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  api_version = {api_version!r}\n"
            "  enabled = {enabled!r}\n"
            "  cpcs = {cpcs}\n"
            "  metrics_contexts = {metrics_contexts}\n"
            "  consoles = {consoles}\n"
            "  all_resources (keys only) = {all_resource_keys}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                hmc_name=self.hmc_name,
                hmc_version=self.hmc_version,
                api_version=self.api_version,
                enabled=self.enabled,
                cpcs=repr_manager(self.cpcs, indent=2),
                metrics_contexts=repr_manager(self.metrics_contexts, indent=2),
                consoles=repr_manager(self.consoles, indent=2),
                all_resource_keys=repr_list(self.all_resources.keys(),
                                            indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _user_patterns = {_user_patterns}\n"
            "  _password_rules = {_password_rules}\n"
            "  _tasks = {_tasks}\n"
            "  _ldap_server_definitions = {_ldap_server_definitions}\n"
            "  _unmanaged_cpcs = {_unmanaged_cpcs}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _storage_groups=repr_manager(self.storage_groups, indent=2),
                _users=repr_manager(self.users, indent=2),
                _user_roles=repr_manager(self.user_roles, indent=2),
                _user_patterns=repr_manager(self.user_patterns, indent=2),
                _password_rules=repr_manager(self.password_rules, indent=2),
                _tasks=repr_manager(self.tasks, indent=2),
                _ldap_server_definitions=repr_manager(
                    self.ldap_server_definitions, indent=2),
                _unmanaged_cpcs=repr_manager(self.unmanaged_cpcs, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _ldap_server_definitions = {_ldap_server_definitions}\n"
            "  _unmanaged_cpcs = {_unmanaged_cpcs}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _storage_groups=repr_manager(self.storage_groups, indent=2),
                _users=repr_manager(self.users, indent=2),
                _user_roles=repr_manager(self.user_roles, indent=2),
                _user_patterns=repr_manager(self.user_patterns, indent=2),
                _password_rules=repr_manager(self.password_rules, indent=2),
                _tasks=repr_manager(self.tasks, indent=2),
                _ldap_server_definitions=repr_manager(
                    self.ldap_server_definitions, indent=2),
                _unmanaged_cpcs=repr_manager(self.unmanaged_cpcs, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _user_roles = {_user_roles}\n"
            "  _user_patterns = {_user_patterns}\n"
            "  _password_rules = {_password_rules}\n"
            "  _tasks = {_tasks}\n"
            "  _ldap_server_definitions = {_ldap_server_definitions}\n"
            "  _unmanaged_cpcs = {_unmanaged_cpcs}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _storage_groups=repr_manager(self.storage_groups, indent=2),
                _users=repr_manager(self.users, indent=2),
                _user_roles=repr_manager(self.user_roles, indent=2),
                _user_patterns=repr_manager(self.user_patterns, indent=2),
                _password_rules=repr_manager(self.password_rules, indent=2),
                _tasks=repr_manager(self.tasks, indent=2),
                _ldap_server_definitions=repr_manager(
                    self.ldap_server_definitions, indent=2),
                _unmanaged_cpcs=repr_manager(self.unmanaged_cpcs, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _lpars = {_lpars}\n"
            "  _partitions = {_partitions}\n"
            "  _adapters = {_adapters}\n"
            "  _virtual_switches = {_virtual_switches}\n"
            "  _reset_activation_profiles = {_reset_activation_profiles}\n"
            "  _image_activation_profiles = {_image_activation_profiles}\n"
            "  _load_activation_profiles = {_load_activation_profiles}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _lpars=repr_manager(self.lpars, indent=2),
                _partitions=repr_manager(self.partitions, indent=2),
                _adapters=repr_manager(self.adapters, indent=2),
                _virtual_switches=repr_manager(
                    self.virtual_switches, indent=2),
                _reset_activation_profiles=repr_manager(
                    self.reset_activation_profiles, indent=2),
                _image_activation_profiles=repr_manager(
                    self.image_activation_profiles, indent=2),
                _load_activation_profiles=repr_manager(
                    self.load_activation_profiles, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _unmanaged_cpcs = {_unmanaged_cpcs}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _storage_groups=repr_manager(self.storage_groups, indent=2),
                _users=repr_manager(self.users, indent=2),
                _user_roles=repr_manager(self.user_roles, indent=2),
                _user_patterns=repr_manager(self.user_patterns, indent=2),
                _password_rules=repr_manager(self.password_rules, indent=2),
                _tasks=repr_manager(self.tasks, indent=2),
                _ldap_server_definitions=repr_manager(
                    self.ldap_server_definitions, indent=2),
                _unmanaged_cpcs=repr_manager(self.unmanaged_cpcs, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  hmc_version = {hmc_version!r}\n"
            "  api_version = {api_version!r}\n"
            "  enabled = {enabled!r}\n"
            "  cpcs = {cpcs}\n"
            "  metrics_contexts = {metrics_contexts}\n"
            "  consoles = {consoles}\n"
            "  all_resources (keys only) = {all_resource_keys}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                hmc_name=self.hmc_name,
                hmc_version=self.hmc_version,
                api_version=self.api_version,
                enabled=self.enabled,
                cpcs=repr_manager(self.cpcs, indent=2),
                metrics_contexts=repr_manager(self.metrics_contexts, indent=2),
                consoles=repr_manager(self.consoles, indent=2),
                all_resource_keys=repr_list(self.all_resources.keys(),
                                            indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
ret = (
            "{classname} at 0x{id:08x} (\n"
            "  _manager = {manager_classname} at 0x{manager_id:08x}\n"
            "  _manager._parent._uri = {parent_uri!r}\n"
            "  _uri = {_uri!r}\n"
            "  _properties = {_properties}\n"
            "  _ports = {_ports}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _ports=repr_manager(self.ports, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _lpars=repr_manager(self.lpars, indent=2),
                _partitions=repr_manager(self.partitions, indent=2),
                _adapters=repr_manager(self.adapters, indent=2),
                _virtual_switches=repr_manager(
                    self.virtual_switches, indent=2),
                _reset_activation_profiles=repr_manager(
                    self.reset_activation_profiles, indent=2),
                _image_activation_profiles=repr_manager(
                    self.image_activation_profiles, indent=2),
                _load_activation_profiles=repr_manager(
                    self.load_activation_profiles, indent=2),
            ))
        return ret
github zhmcclient / python-zhmcclient / zhmcclient_mock / _hmc.py View on Github external
"  _manager._parent._uri = {parent_uri!r}\n"
            "  _uri = {_uri!r}\n"
            "  _properties = {_properties}\n"
            "  _nics = {_nics}\n"
            "  _hbas = {_hbas}\n"
            "  _virtual_functions = {_virtual_functions}\n"
            ")".format(
                classname=self.__class__.__name__,
                id=id(self),
                manager_classname=self._manager.__class__.__name__,
                manager_id=id(self._manager),
                parent_uri=self._manager.parent.uri,
                _uri=self._uri,
                _properties=repr_dict(self.properties, indent=2),
                _nics=repr_manager(self.nics, indent=2),
                _hbas=repr_manager(self.hbas, indent=2),
                _virtual_functions=repr_manager(
                    self.virtual_functions, indent=2),
            ))
        return ret