I am using python management SDK 1.1.0 for automation. and doing api_calls
- I logged in successfully (with username and password only)
- added host with ip address
when I try to add access rule it showing me error as "Requested object [Network] not found".
Here is code -
def add_access_rule(self, rule_name, action, host_name):
payload = {'layer': 'Network', 'position': 'top',
'name': rule_name, 'action': action, 'source': host_name}
add_rule_response = self._api_client.api_call('add-access-rule', payload)
if add_rule_response.success:
print("The rule: '{}' has been added successfully".format(rule_name))
self.publish()
else:
print("Failed to add the access-rule: '{}', Error:\n{}".format(rule_name, add_rule_response.error_message))
I am providing ip-address as host_name which is added in step 2
What am I missing? Please help!