Skip to content

Commit b07e0eb

Browse files
committed
Revert "add comment for param api_key"
This reverts commit 8da142a
1 parent b8b18a9 commit b07e0eb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples_python3/add_access_rule_with_api_key.py renamed to examples_python3/add_group_with_api_key.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#
2-
# add_access_rule_with_api_key.py
2+
# add_group_with_api_key.py
33
# version 1.0
44
#
55
#
66
# This example demonstrates communication with Check Point Management server using Management API Library in Python.
7-
# Login with api-key, and add access rule.
7+
# Login with api-key, and adding a group.
88
# The demonstrated commands are:
99
#
1010
# 1. login with api-key
11-
# 2. adding an access rule to the top of Network layer
11+
# 2. adding a group
1212
# 3. publishing the changes
1313
#
1414
# Logout command is called automatically after the work with Management API Library is completed.
@@ -40,7 +40,7 @@ def main():
4040

4141
with APIClient(client_args) as client:
4242

43-
rule_name = input("Enter the name of the access rule: ")
43+
group_name = input("Enter the name of the group: ")
4444

4545
#
4646
# The API client, would look for the server's certificate SHA1 fingerprint in a file.
@@ -57,13 +57,13 @@ def main():
5757
print("Login failed:\n{}".format(login_res.error_message))
5858
exit(1)
5959

60-
# add a rule to the top of the "Network" layer
61-
add_rule_response = client.api_call("add-access-rule",
62-
{"name": rule_name, "layer": "Network", "position": "top"})
60+
# add the group
61+
add_group_response = client.api_call("add-group",
62+
{"name": group_name})
6363

64-
if add_rule_response.success:
64+
if add_group_response.success:
6565

66-
print("The rule: '{}' has been added successfully".format(rule_name))
66+
print("The group: '{}' has been added successfully".format(group_name))
6767

6868
# publish the result
6969
publish_res = client.api_call("publish", {})
@@ -72,7 +72,7 @@ def main():
7272
else:
7373
print("Failed to publish the changes.")
7474
else:
75-
print("Failed to add the access-rule: '{}', Error:\n{}".format(rule_name, add_rule_response.error_message))
75+
print("Failed to add the group: '{}', Error:\n{}".format(group_name, add_group_response.error_message))
7676

7777

7878
if __name__ == "__main__":

0 commit comments

Comments
 (0)