How to use the dnacentersdk.utils.dict_filt 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 / dnacentersdk / api / networkdiscovery.py View on Github external
path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or []

        self._request_validator('jsd_bf859ac64a0ba19c').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.post(apply_path_params('/api/v1/global-credential/http-read', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.post(apply_path_params('/api/v1/global-credential/http-read', path_params), params=params, json=payload)

        return self._object_factory('bpm_bf859ac64a0ba19c', json_data)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
path_params = {
            'deviceId': path_param_device_id,
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_ba9dc85b4b8a9a17').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.get(apply_path_params('/api/v1/interface/network-device/${deviceId}', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.get(apply_path_params('/api/v1/interface/network-device/${deviceId}', path_params), params=params, json=payload)

        return self._object_factory('bpm_ba9dc85b4b8a9a17', json_data)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / networkdiscovery.py View on Github external
def get_discovered_network_devices_by_discovery_id(self, path_param_id, param_task_id = None, headers=None,payload=None,**request_parameters):
        check_type( param_task_id, basestring)
        check_type( path_param_id, basestring, may_be_none=False)
        if headers is not None:
            check_type( headers.get('X-Auth-Token', self._session.headers.get('X-Auth-Token')), basestring, may_be_none=False)

        params = { }
        if param_task_id is not None: params.update( { 'taskId': param_task_id })
        params.update(dict_filt(request_parameters, 'params'))

        path_params = {
            'id': path_param_id,
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_f6ac994f451ba011').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
'serialNumber': path_param_serial_number,
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_d888ab6d4d59a8c1').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.get(apply_path_params('/api/v1/network-device/serial-number/${serialNumber}', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.get(apply_path_params('/api/v1/network-device/serial-number/${serialNumber}', path_params), params=params, json=payload)

        return self._object_factory('bpm_d888ab6d4d59a8c1', json_data)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / templateprogrammer.py View on Github external
params = { }
        if param_project_id is not None: params.update( { 'projectId': param_project_id })
        if param_software_type is not None: params.update( { 'softwareType': param_software_type })
        if param_software_version is not None: params.update( { 'softwareVersion': param_software_version })
        if param_product_family is not None: params.update( { 'productFamily': param_product_family })
        if param_product_series is not None: params.update( { 'productSeries': param_product_series })
        if param_product_type is not None: params.update( { 'productType': param_product_type })
        if param_filter_conflicting_templates is not None: params.update( { 'filterConflictingTemplates': param_filter_conflicting_templates })
        params.update(dict_filt(request_parameters, 'params'))

        path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_01b09a254b9ab259').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.get(apply_path_params('/api/v1/template-programmer/template', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.get(apply_path_params('/api/v1/template-programmer/template', path_params), params=params, json=payload)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
def get_ospf_interfaces(self, headers=None,payload=None,**request_parameters):
        if headers is not None:
            check_type( headers.get('X-Auth-Token', self._session.headers.get('X-Auth-Token')), basestring, may_be_none=False)

        params = { }
        params.update(dict_filt(request_parameters, 'params'))

        path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_70ad397649e9b4d3').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / nonfabricwireless.py View on Github external
'managedAPLocations': path_param_managed_aplocations,
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_cca098344a489dfa').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.delete(apply_path_params('/dna/intent/api/v1/provision-ssid/${ssidName}/${managedAPLocations}', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.delete(apply_path_params('/dna/intent/api/v1/provision-ssid/${ssidName}/${managedAPLocations}', path_params), params=params, json=payload)

        return self._object_factory('bpm_cca098344a489dfa', json_data)
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
def get_device_config_for_all_devices(self, headers=None,payload=None,**request_parameters):
        if headers is not None:
            check_type( headers.get('X-Auth-Token', self._session.headers.get('X-Auth-Token')), basestring, may_be_none=False)

        params = { }
        params.update(dict_filt(request_parameters, 'params'))

        path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_b7bcaa084e2b90d0').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
if param_software_version is not None: params.update( { 'softwareVersion': param_software_version })
        if param_software_type is not None: params.update( { 'softwareType': param_software_type })
        if param_reachability_status is not None: params.update( { 'reachabilityStatus': param_reachability_status })
        if param_reachability_failure_reason is not None: params.update( { 'reachabilityFailureReason': param_reachability_failure_reason })
        if param_error_code is not None: params.update( { 'errorCode': param_error_code })
        if param_platform_id is not None: params.update( { 'platformId': param_platform_id })
        if param_series is not None: params.update( { 'series': param_series })
        if param_type is not None: params.update( { 'type': param_type })
        if param_serial_number is not None: params.update( { 'serialNumber': param_serial_number })
        if param_up_time is not None: params.update( { 'upTime': param_up_time })
        if param_role is not None: params.update( { 'role': param_role })
        if param_role_source is not None: params.update( { 'roleSource': param_role_source })
        if param_associated_wlc_ip is not None: params.update( { 'associatedWlcIp': param_associated_wlc_ip })
        if param_offset is not None: params.update( { 'offset': param_offset })
        if param_limit is not None: params.update( { 'limit': param_limit })
        params.update(dict_filt(request_parameters, 'params'))

        path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_ffa748cc44e9a437').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
github cisco-en-programmability / dnacentersdk / dnacentersdk / api / devices.py View on Github external
path_params = {
        }
        path_params.update(dict_filt(request_parameters, 'path_params'))

        payload = payload or {}
        payload.update( dict_filt(request_parameters, 'payload') )

        self._request_validator('jsd_b7bcaa084e2b90d0').validate(payload)

        with_custom_headers = False
        _headers = self._session.headers or {}
        if headers:
                _headers.update(headers)
                with_custom_headers = True
        if dict_filt(request_parameters, 'headers'):
                _headers.update(dict_filt(request_parameters, 'headers'))
                with_custom_headers = True


        # API request
        json_data = self._session.get(apply_path_params('/api/v1/network-device/config', path_params), params=params, json=payload, headers=_headers) if with_custom_headers \
        else self._session.get(apply_path_params('/api/v1/network-device/config', path_params), params=params, json=payload)

        return self._object_factory('bpm_b7bcaa084e2b90d0', json_data)