How to use the ansible.module_utils.misc.dict_subset function in ansible

To help you get started, we’ve selected a few ansible 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 CiscoDevNet / FTDAnsible / library / generated / ftd_geolocation_update_schedule.py View on Github external
def deleteGeolocationUpdateSchedule(self, params):
        path_params = dict_subset(params, ['objId'])

        return self._conn.send_request(
            url_path='/managedentity/geolocationupdateschedules/{objId}',
            http_method='DELETE',
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_smart_agent_connection.py View on Github external
def addSmartAgentConnection(self, params):
        body_params = dict_subset(params, ['connectionType', 'id', 'token', 'type', 'version'])

        return self._conn.send_request(
            url_path='/license/smartagentconnections',
            http_method='POST',
            body_params=body_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_network_object_group.py View on Github external
def editNetworkObjectGroup(self, params):
        path_params = dict_subset(params, ['objId'])
        body_params = dict_subset(params, ['description', 'id', 'isSystemDefined', 'name', 'objects', 'type', 'version'])

        return self.edit_object(
            url_path='/object/networkgroups/{objId}',
            body_params=body_params,
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_archived_backup.py View on Github external
def deleteArchivedBackup(self, params):
        path_params = dict_subset(params, ['objId'])

        return self._conn.send_request(
            url_path='/managedentity/archivedbackups/{objId}',
            http_method='DELETE',
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_network_object.py View on Github external
def editNetworkObject(self, params):
        path_params = dict_subset(params, ['objId'])
        body_params = dict_subset(params, ['description', 'dnsResolution', 'id', 'isSystemDefined', 'name', 'subType', 'type', 'value', 'version'])

        return self.edit_object(
            url_path='/object/networks/{objId}',
            body_params=body_params,
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_any_connect_group_policy.py View on Github external
def getAnyConnectGroupPolicy(self, params):
        path_params = dict_subset(params, ['objId'])

        return self._conn.send_request(
            url_path='/devices/default/anyconnectgrouppolicies/{objId}',
            http_method='GET',
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_interface.py View on Github external
def editBridgeGroupInterface(params):
        path_params = dict_subset(params, ['objId'])
        body_params = dict_subset(params, ['version', 'name', 'description', 'hardwareName', 'monitorInterface', 'ipv4', 'ipv6', 'selectedInterfaces', 'bridgeGroupId', 'id', 'type'])

        url = construct_url(params['hostname'], '/devices/default/bridgegroupinterfaces/{objId}', path_params=path_params)
        request_params = dict(
            headers=base_headers(params['access_token']),
            method='PUT',
            data=json.dumps(body_params)
        )

        response = open_url(url, **request_params).read()
        return json.loads(response) if response else response
github CiscoDevNet / FTDAnsible / library / generated / ftd_ospf.py View on Github external
def deleteOSPF(self, params):
        path_params = dict_subset(params, ['objId'])

        return self._conn.send_request(
            url_path='/devices/default/routing/virtualrouters/default/ospf/{objId}',
            http_method='DELETE',
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_url_object_group.py View on Github external
def getURLObjectGroup(self, params):
        path_params = dict_subset(params, ['objId'])

        return self._conn.send_request(
            url_path='/object/urlgroups/{objId}',
            http_method='GET',
            path_params=path_params,
        )
github CiscoDevNet / FTDAnsible / library / generated / ftd_flex_config_object.py View on Github external
def editFlexConfigObject(self, params):
        path_params = dict_subset(params, ['objId'])
        body_params = dict_subset(params, ['description', 'id', 'isBlacklisted', 'lines', 'name', 'negateLines', 'type', 'variables', 'version'])

        return self._conn.send_request(
            url_path='/object/flexconfigobjects/{objId}',
            http_method='PUT',
            body_params=body_params,
            path_params=path_params,
        )