Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
)
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,
)
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,
)
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,
)
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,
)
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,
)
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
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,
)
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,
)
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,
)