SOLIDserverRest 2.3.9__tar.gz → 2.3.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/PKG-INFO +156 -153
  2. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/README.md +0 -1
  3. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/SOLIDserverRest.py +0 -0
  4. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/__init__.py +10 -2
  5. SOLIDserverRest-2.3.11/SOLIDserverRest/adv/dns_record.py +1200 -0
  6. SOLIDserverRest-2.3.11/SOLIDserverRest/adv/validators.py +50 -0
  7. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/PKG-INFO +156 -153
  8. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/SOURCES.txt +4 -1
  9. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/entry_points.txt +0 -1
  10. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/not-zip-safe +1 -1
  11. SOLIDserverRest-2.3.11/SOLIDserverRest.egg-info/requires.txt +7 -0
  12. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/setup.cfg +4 -4
  13. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/setup.py +6 -6
  14. SOLIDserverRest-2.3.11/tests/test_simple.py +104 -0
  15. SOLIDserverRest-2.3.11/tests/tests.py +287 -0
  16. SOLIDserverRest-2.3.9/SOLIDserverRest/adv/dns_record.py +0 -414
  17. SOLIDserverRest-2.3.9/SOLIDserverRest.egg-info/requires.txt +0 -7
  18. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/LICENSE +0 -0
  19. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/Exception.py +0 -0
  20. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/__init__.py +0 -0
  21. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/base.py +0 -0
  22. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/class_params.py +0 -0
  23. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/device.py +0 -0
  24. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/device_tools.py +0 -0
  25. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/devif.py +0 -0
  26. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/dns.py +0 -0
  27. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/dns_zone.py +0 -0
  28. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/ipaddress.py +0 -0
  29. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/network.py +0 -0
  30. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/sds.py +0 -0
  31. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/adv/space.py +0 -0
  32. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest/mapper.py +0 -0
  33. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/dependency_links.txt +0 -0
  34. {SOLIDserverRest-2.3.9 → SOLIDserverRest-2.3.11}/SOLIDserverRest.egg-info/top_level.txt +0 -0
@@ -1,153 +1,156 @@
1
- Metadata-Version: 2.1
2
- Name: SOLIDserverRest
3
- Version: 2.3.9
4
- Summary: The SOLIDserverRest is a library to drive EfficientIP API
5
- Home-page: https://gitlab.com/efficientip/solidserverrest
6
- Author: Gregory CUGAT / Alex Chauvin
7
- Author-email: gregory.cugat@efficientip.com, ach@efficientip.com
8
- License: BSD 2
9
- Platform: UNKNOWN
10
- Classifier: Intended Audience :: Developers
11
- Classifier: Programming Language :: Python :: 3.7
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
- Classifier: Programming Language :: Python :: 3.10
15
- Requires-Python: >=3.7
16
- Description-Content-Type: text/markdown
17
- License-File: LICENSE
18
-
19
- [![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)
20
-
21
- [![pipeline status](https://gitlab.com/efficientip/solidserverrest/badges/master/pipeline.svg)](https://gitlab.com/efficientip/solidserverrest/commits/master)
22
- [![coverage report](https://gitlab.com/efficientip/solidserverrest/badges/master/coverage.svg)](https://codecov.io/gl/efficientip/solidserverrest)
23
-
24
- # SOLIDserverRest
25
-
26
- This 'SOLIDserverRest' allows to easily interact with [SOLIDserver](https://www.efficientip.com/products/solidserver/)'s REST API.
27
- It allows managing all IPAM objects through CRUD operations.
28
-
29
- * ***Free software***: BSD2 License
30
-
31
- This 'SOLIDserverRest' is compatible with [SOLIDserver](https://www.efficientip.com/products/solidserver/) version 7 and ownward.
32
-
33
- # Install
34
- Install 'SOLIDserverRest' using pip in your virtualenv:
35
-
36
- ```
37
- pip install SOLIDserverRest
38
- ```
39
-
40
- # Usage
41
-
42
- ## Using the SOLIDserverRest advanced object (recommended)
43
-
44
- All commands and object manipulation are going through a SOLIDserver main object, handling the connection to the manager and pushing API calls. The creation of a SOLIDserver object is done like that:
45
- ```
46
- from SOLIDserverRest import *
47
- from SOLIDserverRest import adv as sdsadv
48
-
49
- SDS_HOST = "192.168.254.254"
50
- SDS_LOGIN = "foo"
51
- SDS_PWD = "bar"
52
-
53
- sds = sdsadv.SDS(ip_address=SDS_HOST,
54
- user=SDS_LOGIN,
55
- pwd=SDS_PWD)
56
- try:
57
- sds.connect(method="native")
58
- except SDSError as e:
59
- logging.error(e)
60
- exit(1)
61
-
62
- print(adv)
63
-
64
- ```
65
-
66
- More examples in the example directory.
67
-
68
- ## Using the SOLIDserverRest object
69
-
70
- The raw API is mapped using the SOLIDserverRest object which handle the connection, prepare the formating and handle some errors. It can be usefull twhen the advanced library is not yet implementing an object that you require in your code.
71
-
72
- ### 1. Declare endpoint API point
73
- Set the API endpoint you want to talk with through API. Could use an IP address
74
- (v4 or v6) or a host name
75
- * host = IP address of the SOLIDserver server
76
- ```
77
- con = SOLIDserverRest("fqdn_host.org")
78
- ```
79
-
80
- ### 2. Specify connection method
81
- You can use native connection mode using SOLIDserver default method which provide
82
- authentication through headers in the requests with information
83
- encoded in base64
84
-
85
- * user = user who want to use
86
- * password = password of the user
87
-
88
- ```python
89
- con.use_native_sds(user="apiuser", password="apipwd")
90
- ```
91
-
92
- You can also use the basic authentication method for connecting the SOLIDserver.
93
-
94
- * user = user who want to use
95
- * password = password of the user
96
-
97
- ```python
98
- con.use_basicauth_sds(user="apiuser", password="apipwd")
99
- ```
100
-
101
- ### 3. Set TLS security
102
- SSL certificate chain is validated by default, to disable it, use the set_ssl_verify method
103
-
104
- ```python
105
- con.set_ssl_verify(False) # True by default
106
- rest_answer = con.query("method", "parameters")
107
- ```
108
-
109
- Otherwise, you have to provide the certificate file:
110
- ```python
111
- con = SOLIDserverRest(SERVER)
112
- ```
113
- If the certificate file is not valide, an exception ```SDSInitError``` is raised.
114
-
115
- ### 4. Request to SOLIDserver API
116
-
117
- You need parameters:
118
- * method = choose your method in the list below
119
- * parameters = Python dictionary with parameters you want to use
120
-
121
- ```python
122
- rest_answer = con.query("method", "parameters")
123
- ```
124
-
125
- ### 5. Analyze answer
126
-
127
- * rest_answer => object name
128
- * rest_answer.status_code => current http answer code set in the object
129
- * rest_answer.content => Answer core from SOLIDserver API set in the object
130
-
131
- Example:
132
- ```python
133
- print(rest_answer)
134
- print(rest_answer.status_code)
135
- print(rest_answer.content)
136
- ```
137
-
138
- # Methods that could be used
139
- Methods are organized to match the ontology used in SOLIDServer, you will find:
140
- * Sites - address spaces
141
- * Subnets (v4 and v6)
142
- * Pools (v4 and v6)
143
- * Addresses (v4 and v6)
144
- * Aliases (v4 and v6)
145
- * DNS servers, views, zones, RR, acl, key
146
- * application manager
147
- * DHCP server, scope, shared net, range, static, group
148
- * device manager
149
- * VLAN manager
150
-
151
- More information about supported methods in the [specific document](docs/METHODS.md)
152
-
153
-
1
+ Metadata-Version: 2.1
2
+ Name: SOLIDserverRest
3
+ Version: 2.3.11
4
+ Summary: The SOLIDserverRest is a library to drive EfficientIP API
5
+ Home-page: https://gitlab.com/efficientip/solidserverrest
6
+ Author: Gregory CUGAT / Alex Chauvin
7
+ Author-email: gregory.cugat@efficientip.com, ach@efficientip.com
8
+ License: BSD 2
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3.7
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Requires-Python: >=3.7
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: requests~=2.31
18
+ Requires-Dist: PySocks~=1.7
19
+ Requires-Dist: urllib3~=1.26
20
+ Requires-Dist: idna~=3.6
21
+ Requires-Dist: chardet~=5.2
22
+ Requires-Dist: pyopenssl~=24.0
23
+ Requires-Dist: packaging~=23.2
24
+
25
+ [![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)
26
+
27
+ [![pipeline status](https://gitlab.com/efficientip/solidserverrest/badges/master/pipeline.svg)](https://gitlab.com/efficientip/solidserverrest/commits/master)
28
+
29
+ # SOLIDserverRest
30
+
31
+ This 'SOLIDserverRest' allows to easily interact with [SOLIDserver](https://www.efficientip.com/products/solidserver/)'s REST API.
32
+ It allows managing all IPAM objects through CRUD operations.
33
+
34
+ * ***Free software***: BSD2 License
35
+
36
+ This 'SOLIDserverRest' is compatible with [SOLIDserver](https://www.efficientip.com/products/solidserver/) version 7 and ownward.
37
+
38
+ # Install
39
+ Install 'SOLIDserverRest' using pip in your virtualenv:
40
+
41
+ ```
42
+ pip install SOLIDserverRest
43
+ ```
44
+
45
+ # Usage
46
+
47
+ ## Using the SOLIDserverRest advanced object (recommended)
48
+
49
+ All commands and object manipulation are going through a SOLIDserver main object, handling the connection to the manager and pushing API calls. The creation of a SOLIDserver object is done like that:
50
+ ```
51
+ from SOLIDserverRest import *
52
+ from SOLIDserverRest import adv as sdsadv
53
+
54
+ SDS_HOST = "192.168.254.254"
55
+ SDS_LOGIN = "foo"
56
+ SDS_PWD = "bar"
57
+
58
+ sds = sdsadv.SDS(ip_address=SDS_HOST,
59
+ user=SDS_LOGIN,
60
+ pwd=SDS_PWD)
61
+ try:
62
+ sds.connect(method="native")
63
+ except SDSError as e:
64
+ logging.error(e)
65
+ exit(1)
66
+
67
+ print(adv)
68
+
69
+ ```
70
+
71
+ More examples in the example directory.
72
+
73
+ ## Using the SOLIDserverRest object
74
+
75
+ The raw API is mapped using the SOLIDserverRest object which handle the connection, prepare the formating and handle some errors. It can be usefull twhen the advanced library is not yet implementing an object that you require in your code.
76
+
77
+ ### 1. Declare endpoint API point
78
+ Set the API endpoint you want to talk with through API. Could use an IP address
79
+ (v4 or v6) or a host name
80
+ * host = IP address of the SOLIDserver server
81
+ ```
82
+ con = SOLIDserverRest("fqdn_host.org")
83
+ ```
84
+
85
+ ### 2. Specify connection method
86
+ You can use native connection mode using SOLIDserver default method which provide
87
+ authentication through headers in the requests with information
88
+ encoded in base64
89
+
90
+ * user = user who want to use
91
+ * password = password of the user
92
+
93
+ ```python
94
+ con.use_native_sds(user="apiuser", password="apipwd")
95
+ ```
96
+
97
+ You can also use the basic authentication method for connecting the SOLIDserver.
98
+
99
+ * user = user who want to use
100
+ * password = password of the user
101
+
102
+ ```python
103
+ con.use_basicauth_sds(user="apiuser", password="apipwd")
104
+ ```
105
+
106
+ ### 3. Set TLS security
107
+ SSL certificate chain is validated by default, to disable it, use the set_ssl_verify method
108
+
109
+ ```python
110
+ con.set_ssl_verify(False) # True by default
111
+ rest_answer = con.query("method", "parameters")
112
+ ```
113
+
114
+ Otherwise, you have to provide the certificate file:
115
+ ```python
116
+ con = SOLIDserverRest(SERVER)
117
+ ```
118
+ If the certificate file is not valide, an exception ```SDSInitError``` is raised.
119
+
120
+ ### 4. Request to SOLIDserver API
121
+
122
+ You need parameters:
123
+ * method = choose your method in the list below
124
+ * parameters = Python dictionary with parameters you want to use
125
+
126
+ ```python
127
+ rest_answer = con.query("method", "parameters")
128
+ ```
129
+
130
+ ### 5. Analyze answer
131
+
132
+ * rest_answer => object name
133
+ * rest_answer.status_code => current http answer code set in the object
134
+ * rest_answer.content => Answer core from SOLIDserver API set in the object
135
+
136
+ Example:
137
+ ```python
138
+ print(rest_answer)
139
+ print(rest_answer.status_code)
140
+ print(rest_answer.content)
141
+ ```
142
+
143
+ # Methods that could be used
144
+ Methods are organized to match the ontology used in SOLIDServer, you will find:
145
+ * Sites - address spaces
146
+ * Subnets (v4 and v6)
147
+ * Pools (v4 and v6)
148
+ * Addresses (v4 and v6)
149
+ * Aliases (v4 and v6)
150
+ * DNS servers, views, zones, RR, acl, key
151
+ * application manager
152
+ * DHCP server, scope, shared net, range, static, group
153
+ * device manager
154
+ * VLAN manager
155
+
156
+ More information about supported methods in the [specific document](docs/METHODS.md)
@@ -1,7 +1,6 @@
1
1
  [![License](https://img.shields.io/badge/License-BSD%202--Clause-blue.svg)](https://opensource.org/licenses/BSD-2-Clause)
2
2
 
3
3
  [![pipeline status](https://gitlab.com/efficientip/solidserverrest/badges/master/pipeline.svg)](https://gitlab.com/efficientip/solidserverrest/commits/master)
4
- [![coverage report](https://gitlab.com/efficientip/solidserverrest/badges/master/coverage.svg)](https://codecov.io/gl/efficientip/solidserverrest)
5
4
 
6
5
  # SOLIDserverRest
7
6
 
@@ -17,6 +17,14 @@ from .network import Network
17
17
  from .ipaddress import IpAddress
18
18
  from .dns import DNS
19
19
  from .dns_zone import DNS_zone
20
- from .dns_record import DNS_record
21
-
20
+ from .dns_record import (
21
+ DNS_record,
22
+ NAPTRRecord,
23
+ TXTRecord,
24
+ ARecord,
25
+ AAAARecord,
26
+ CNAMERecord,
27
+ MXRecord,
28
+ NSRecord
29
+ )
22
30
  from .device_tools import list_devices