Skip to content

Commit 873967f

Browse files
committed
project rearrangement
1 parent 4fad268 commit 873967f

File tree

5 files changed

+55
-62
lines changed

5 files changed

+55
-62
lines changed

README.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,5 @@ or by clicking the _‘Download ZIP’_ button.
1414
Download and install the [Check Point API Python SDK](https://github.com/CheckPointSW/cp_mgmt_api_python_sdk)
1515
repository, follow the instructions in the SDK repository.
1616

17-
## AddTagToObjects.py
18-
Tool to add a tag to multiple objects.
19-
<br>The tool supports three modes of tagging by given partial-name:
20-
* Add tag to all objects.
21-
* Add tag to the unused objects.
22-
* Add tag to the used objects.
23-
24-
<br>If partial name is not supplied the tool will tag all unused objects.
25-
26-
#### Main Options
27-
*__More options and details can be found with the '-h' option by running:__ python AddTagToObjects.py –h*
28-
29-
* [--tag, -t]&emsp; The tag name that will be added to the objects.
30-
* [--partial-name , -pn]&emsp; Add tag to objects shown in object explorer by the provided partial-name.
31-
This field required in case of using \'--mode\' flag. The default is to add tag to all unused objects in the domain.
32-
* [--mode, -md]&emsp; Whether to consider if the objects are used or unused when adding the tag by name.
33-
<br>&emsp;&emsp;There are three modes, the default is \'unused\':<br>
34-
* unused: add tag only to unused objects with the given partial-name.
35-
* used: add tag only to used objects with the given partial-name.
36-
* all: add tag to all objects with the given partial-name.
37-
38-
#### Examples
39-
* Running the tool on a remote management server:
40-
<br>```python AddTagToObjects.py --tag TagForUnusedObjects -m 172.23.78.160 -u James -p MySecretPassword!```
41-
<br>The tool runs on a remote management server with IP address 172.23.78.160 and the tag "MyTag" will be added to all unused objects.
42-
43-
* Running the tool on a Multi-Domain Server for a specific domain:
44-
<br>```python AddTagToObjects.py -t MyTag -d local_domain -u James -p MySecretPassword!```
45-
46-
* Running the tool on a Security Management Server with partial name:
47-
<br>```python AddTagToObjects.py --tag my_host --partial-name "host_" -u James -p MySecretPassword!```
48-
<br>The tool will add "my_host" tag to all the unused objects that are found in the explorer with the given partial-name.
49-
50-
* Running the tool on a Security Management Server with partial name of unused objects:
51-
<br>```python AddTagToObjects.py --tag my_host --partial-name "host_" --mode all -u James -p MySecretPassword!```
52-
<br>The tool will add "my_host" tag to all the objects that are found in the explorer with the given partial-name.
53-
54-
55-
## ReplaceReference.py
56-
Replace references of two given objects.
57-
The tool supports replacement in Access, Threat and Nat rules, and in groups and service-groups.
58-
59-
#### Main Options
60-
*__More options and details can be found with the '-h' option by running:__ python ReplaceReference.py –h*
61-
62-
* [--original-reference, -o]&emsp; The full name of the replaced object, must be unique name.
63-
* [--new-reference, -n]&emsp; The full name of the new object, must be unique name.
64-
65-
#### Examples
66-
* Running the tool on a remote management server:
67-
<br>```python ReplaceReference.py --original-reference old_host --new-reference new_host -m 172.23.78.160 -u James -p MySecretPassword!```
68-
<br>The tool runs on a remote management server with IP address 172.23.78.160 and replaces references from old_host to new_host.
69-
70-
* Running the tool on a Multi-Domain Server for a specific domain:
71-
<br>```python ReplaceReference.py -o Global_object -n local_object -d local_domain -u James -p MySecretPassword!```
72-
<br>The tool can replace references to a Global object with references to a local object.
73-
74-
7517
## Development Environment
7618
The tool is developed using Python language version 2.7, version 3.7 and [Check Point API Python SDK](https://github.com/CheckPointSW/cp_mgmt_api_python_sdk).
77-
78-
79-
80-

reference/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## ReplaceReference.py
2+
Replace references of two given objects.
3+
The tool supports replacement in Access, Threat and Nat rules, and in groups and service-groups.
4+
5+
#### Main Options
6+
*__More options and details can be found with the '-h' option by running:__ python ReplaceReference.py –h*
7+
8+
* [--original-reference, -o]&emsp; The full name of the replaced object, must be unique name.
9+
* [--new-reference, -n]&emsp; The full name of the new object, must be unique name.
10+
11+
#### Examples
12+
* Running the tool on a remote management server:
13+
<br>```python ReplaceReference.py --original-reference old_host --new-reference new_host -m 172.23.78.160 -u James -p MySecretPassword!```
14+
<br>The tool runs on a remote management server with IP address 172.23.78.160 and replaces references from old_host to new_host.
15+
16+
* Running the tool on a Multi-Domain Server for a specific domain:
17+
<br>```python ReplaceReference.py -o Global_object -n local_object -d local_domain -u James -p MySecretPassword!```
18+
<br>The tool can replace references to a Global object with references to a local object.
19+
File renamed without changes.
File renamed without changes.

tags/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## AddTagToObjects.py
2+
Tool to add a tag to multiple objects.
3+
<br>The tool supports three modes of tagging by given partial-name:
4+
* Add tag to all objects.
5+
* Add tag to the unused objects.
6+
* Add tag to the used objects.
7+
8+
<br>If partial name is not supplied the tool will tag all unused objects.
9+
10+
#### Main Options
11+
*__More options and details can be found with the '-h' option by running:__ python AddTagToObjects.py –h*
12+
13+
* [--tag, -t]&emsp; The tag name that will be added to the objects.
14+
* [--partial-name , -pn]&emsp; Add tag to objects shown in object explorer by the provided partial-name.
15+
This field required in case of using \'--mode\' flag. The default is to add tag to all unused objects in the domain.
16+
* [--mode, -md]&emsp; Whether to consider if the objects are used or unused when adding the tag by name.
17+
<br>&emsp;&emsp;There are three modes, the default is \'unused\':<br>
18+
* unused: add tag only to unused objects with the given partial-name.
19+
* used: add tag only to used objects with the given partial-name.
20+
* all: add tag to all objects with the given partial-name.
21+
22+
#### Examples
23+
* Running the tool on a remote management server:
24+
<br>```python AddTagToObjects.py --tag TagForUnusedObjects -m 172.23.78.160 -u James -p MySecretPassword!```
25+
<br>The tool runs on a remote management server with IP address 172.23.78.160 and the tag "MyTag" will be added to all unused objects.
26+
27+
* Running the tool on a Multi-Domain Server for a specific domain:
28+
<br>```python AddTagToObjects.py -t MyTag -d local_domain -u James -p MySecretPassword!```
29+
30+
* Running the tool on a Security Management Server with partial name:
31+
<br>```python AddTagToObjects.py --tag my_host --partial-name "host_" -u James -p MySecretPassword!```
32+
<br>The tool will add "my_host" tag to all the unused objects that are found in the explorer with the given partial-name.
33+
34+
* Running the tool on a Security Management Server with partial name of unused objects:
35+
<br>```python AddTagToObjects.py --tag my_host --partial-name "host_" --mode all -u James -p MySecretPassword!```
36+
<br>The tool will add "my_host" tag to all the objects that are found in the explorer with the given partial-name.

0 commit comments

Comments
 (0)