How to use the dnacentersdk.api.custom_caller.CustomCaller function in dnacentersdk

To help you get started, we’ve selected a few dnacentersdk 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 cisco-en-programmability / dnacentersdk / tests / test_dnacentersdk.py View on Github external
def test_api_object_creation(self, api):
        assert isinstance(api.authentication, Authentication)
        assert isinstance(api.custom_caller, CustomCaller)
        if api.version == '1.2.10':
            assert isinstance(api.clients, Clients_v1_2_10)
            assert isinstance(api.command_runner, CommandRunner_v1_2_10)
            assert isinstance(api.devices, Devices_v1_2_10)
            assert isinstance(api.fabric_wired, FabricWired_v1_2_10)
            assert isinstance(api.file, File_v1_2_10)
            assert isinstance(api.network_discovery, NetworkDiscovery_v1_2_10)
            assert isinstance(api.networks, Networks_v1_2_10)
            assert isinstance(api.non_fabric_wireless, NonFabricWireless_v1_2_10)
            assert isinstance(api.path_trace, PathTrace_v1_2_10)
            assert isinstance(api.pnp, Pnp_v1_2_10)
            assert isinstance(api.swim, Swim_v1_2_10)
            assert isinstance(api.site_profile, SiteProfile_v1_2_10)
            assert isinstance(api.sites, Sites_v1_2_10)
            assert isinstance(api.tag, Tag_v1_2_10)
            assert isinstance(api.task, Task_v1_2_10)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / __init__.py View on Github external
self._session, object_factory, validator
                )
            self.topology = \
                Topology_v2_1_1(
                    self._session, object_factory, validator
                )
            self.users = \
                Users_v2_1_1(
                    self._session, object_factory, validator
                )
            self.wireless = \
                Wireless_v2_1_1(
                    self._session, object_factory, validator
                )
        self.custom_caller = \
            CustomCaller(self._session, object_factory)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / custom_caller.py View on Github external
def __init__(self, session, object_factory):
        """Initialize a new CustomCaller object with the provided RestSession.

        Args:
            session(RestSession): The RESTful session object to be used for
                API calls to the DNA Center service.

        Raises:
            TypeError: If the parameter types are incorrect.

        """
        check_type(session, RestSession)

        super(CustomCaller, self).__init__()

        self._session = session
        self._object_factory = object_factory

        if self._session._debug:
            logger.setLevel(logging.DEBUG)
            logger.propagate = True
        else:
            logger.addHandler(logging.NullHandler())
            logger.propagate = False