oc-cdtapi 3.14.0__py3-none-any.whl → 3.15.0__py3-none-any.whl
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.
- oc_cdtapi/ForemanAPI.py +25 -1
- {oc_cdtapi-3.14.0.dist-info → oc_cdtapi-3.15.0.dist-info}/METADATA +1 -1
- {oc_cdtapi-3.14.0.dist-info → oc_cdtapi-3.15.0.dist-info}/RECORD +7 -7
- {oc_cdtapi-3.14.0.data → oc_cdtapi-3.15.0.data}/scripts/nexus.py +0 -0
- {oc_cdtapi-3.14.0.dist-info → oc_cdtapi-3.15.0.dist-info}/LICENSE +0 -0
- {oc_cdtapi-3.14.0.dist-info → oc_cdtapi-3.15.0.dist-info}/WHEEL +0 -0
- {oc_cdtapi-3.14.0.dist-info → oc_cdtapi-3.15.0.dist-info}/top_level.txt +0 -0
oc_cdtapi/ForemanAPI.py
CHANGED
@@ -71,7 +71,31 @@ class ForemanAPI(HttpAPI):
|
|
71
71
|
return posixpath.join(self.root, "api", req)
|
72
72
|
else:
|
73
73
|
return posixpath.join(self.root, req)
|
74
|
-
|
74
|
+
|
75
|
+
def get_host_by_owner(self, owner):
|
76
|
+
"""
|
77
|
+
wrapper for api v1/v2
|
78
|
+
"""
|
79
|
+
logging.debug('Reached get_host_by_owner')
|
80
|
+
logging.debug('owner = [%s]' % owner)
|
81
|
+
if self.apiversion == 1:
|
82
|
+
logging.error('Not supported in v1, returning None')
|
83
|
+
return None
|
84
|
+
elif self.apiversion == 2:
|
85
|
+
logging.debug('Passing to get_host_by_owner_v2')
|
86
|
+
return self.get_host_by_owner_v2(owner)
|
87
|
+
|
88
|
+
def get_host_by_owner_v2(self, owner):
|
89
|
+
logging.debug('Reached get_host_by_owner_v2')
|
90
|
+
logging.debug('owner = [%s]' % owner)
|
91
|
+
params = {
|
92
|
+
'search': f'owner={owner_login}',
|
93
|
+
'per_page': 'all'
|
94
|
+
}
|
95
|
+
response = self.get('hosts', params=params)
|
96
|
+
results = response.get('results')
|
97
|
+
return results
|
98
|
+
|
75
99
|
def get_environment(self, env_name):
|
76
100
|
"""
|
77
101
|
wrapper for api v1/v2
|
@@ -3,16 +3,16 @@ oc_cdtapi/Dbsm2API.py,sha256=WDBst1dCAmDVU9d9Ogzwp2nkjtKZ4thU2xG4sAPI_Nk,9963
|
|
3
3
|
oc_cdtapi/DevPIAPI.py,sha256=9WND9ld66eHmC5qoLJq3KDYSoO-pP69UqOQsGZNLZYg,1835
|
4
4
|
oc_cdtapi/DmsAPI.py,sha256=eNFdwQLhCbPvHB5SUtP4QcZZtSdjkgt_Cxn3oQ3iJ5s,15605
|
5
5
|
oc_cdtapi/DmsGetverAPI.py,sha256=ZPU4HlF59fngKu5mSFhtss3rlBuduffDOSm_y3XWrxk,15556
|
6
|
-
oc_cdtapi/ForemanAPI.py,sha256=
|
6
|
+
oc_cdtapi/ForemanAPI.py,sha256=c0nbgr-BVD5WGc73-CHafcOvEu0uQyG7egZtNVMMFe8,43958
|
7
7
|
oc_cdtapi/JenkinsAPI.py,sha256=lZ8pe3a4eb_6h53JE7QLuzOSlu7Sqatc9PQwWhio9Vg,15748
|
8
8
|
oc_cdtapi/NexusAPI.py,sha256=uU12GtHvKlWorFaPAnFcQ5AGEc94MZ5SdmfM2Pw3F7A,26122
|
9
9
|
oc_cdtapi/PgQAPI.py,sha256=bAgwo4YVuD60uAEv7hrjTQmmAfcMP86IBlSNhlXJzWc,6882
|
10
10
|
oc_cdtapi/RundeckAPI.py,sha256=O3LmcFaHSz8UqeUyIHTTEMJncDD191Utd-iZaeJay2s,24243
|
11
11
|
oc_cdtapi/TestServer.py,sha256=HV97UWg2IK4gOYAp9yaMdwFUWsw9v66MxyZdI3qQctA,2715
|
12
12
|
oc_cdtapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
-
oc_cdtapi-3.
|
14
|
-
oc_cdtapi-3.
|
15
|
-
oc_cdtapi-3.
|
16
|
-
oc_cdtapi-3.
|
17
|
-
oc_cdtapi-3.
|
18
|
-
oc_cdtapi-3.
|
13
|
+
oc_cdtapi-3.15.0.data/scripts/nexus.py,sha256=4teqZ_KtCSrwHDJVgA7lkreteod4Xt5XJFZNbwb7E6E,6858
|
14
|
+
oc_cdtapi-3.15.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
15
|
+
oc_cdtapi-3.15.0.dist-info/METADATA,sha256=fA9srNGt9qI6nY9yuins7PBGPEy91krfLWhkg76YoYs,431
|
16
|
+
oc_cdtapi-3.15.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
17
|
+
oc_cdtapi-3.15.0.dist-info/top_level.txt,sha256=d4-5-D-0CSeSXYuLCP7-nIFCpjkfmJr-Y_muzds8iVU,10
|
18
|
+
oc_cdtapi-3.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|