api.local_policy

Cisco vManage Localized Policy API Methods.

Module Contents

class api.local_policy.LocalPolicy(session, host, port=443)[source]

Bases: object

vManage Local Policy API

Responsible for DELETE, GET, POST, PUT methods against vManage Local Policy.

add_local_policy(self, policy)[source]

Delete a Central Policy from vManage.

Parameters

policy – The Central Policy

Returns

All data associated with a response.

Return type

result (dict)

update_local_policy(self, policy, policy_id)[source]

Update a Central from vManage.

Parameters
  • policy – The Central Policy

  • policy_id – The ID of the Central Policy to update

Returns

All data associated with a response.

Return type

result (dict)

delete_local_policy(self, policy_id)[source]

Deletes the specified local policy

Parameters

policyId (str) – ID of the active local policy

Returns

All data associated with a response.

Return type

result (dict)

get_local_policy(self)[source]

Obtain a list of all configured local policies

Returns

All data associated with a response.

Return type

result (dict)

get_local_policy_list(self)[source]

Get all Central Policies from vManage.

Returns

A list of all policy lists currently

in vManage.

Return type

response (dict)

get_local_policy_dict(self, key_name='policyName', remove_key=False)[source]

Get all Local Policies from vManage.

Parameters
  • key_name (str) – The name of the attribute to use as the key

  • remove_key (bool) – Remove the key from the dict (default: False)

Returns

A dict of all Local Polices currently

in vManage.

Return type

response (dict)