Skip to content

Commit 48044f3

Browse files
committed
lint fixes
1 parent 6e4ccd9 commit 48044f3

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 3.2.0
4+
5+
- Updated spec as per v3.6.9
6+
37
## 3.1.0
48

59
- Updated spec as per v3.5.9

bin/generate.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ def parse_component_properties(properties, required):
8383
if data.get('readOnly'):
8484
continue
8585

86-
parameter = {'name': name, 'type': data.get('type', 'object'),
87-
'description': data.get('title', data.get('description', name.replace('_', ' ').capitalize()))}
86+
parameter = {
87+
'name': name,
88+
'type': data.get('type', 'object'),
89+
'description': data.get('title', data.get('description', name.replace('_', ' ').capitalize()))
90+
}
8891

8992
if name in required:
9093
parameter['required'] = True
@@ -124,8 +127,8 @@ def get_actions(spec):
124127
}
125128

126129
print(f'Processing {action_name} ...')
127-
ref = method_spec.get('requestBody', {}).get('content', {}).get('application/json', {}).get('schema',
128-
{}).get('$ref')
130+
content = method_spec.get('requestBody', {}).get('content', {})
131+
ref = content.get('application/json', {}).get('schema', {}).get('$ref')
129132

130133
if ref:
131134
ref_name = ref.split('/')[-1]
@@ -172,7 +175,9 @@ def get_actions(spec):
172175
for detailed_get in deferred_detail_gets:
173176
list_action = actions.get(detailed_get)
174177
if list_action is None:
175-
raise Exception("Unable to find list action for deferred GET endpoint {}".format(detailed_get))
178+
raise Exception(
179+
"Unable to find list action for deferred GET endpoint {}".format(detailed_get)
180+
)
176181

177182
return actions
178183

@@ -212,8 +217,17 @@ def main():
212217
Main entry point.
213218
"""
214219
parser = argparse.ArgumentParser()
215-
parser.add_argument('--host', type=str, default='https://demo.netbox.dev', help='NetBox hostname')
216-
parser.add_argument('--no-verify-ssl', action='store_false', help='Disable SSL certificate verification')
220+
parser.add_argument(
221+
'--host',
222+
type=str,
223+
default='https://demo.netbox.dev',
224+
help='NetBox hostname'
225+
)
226+
parser.add_argument(
227+
'--skip-ssl',
228+
action='store_false',
229+
help='Disable SSL certificate verification'
230+
)
217231

218232
args = parser.parse_args()
219233
host = str(args.host).rstrip('/')

pack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords:
66
- networking
77
- ipam
88
- dcim
9-
version: 3.1.0
9+
version: 3.2.0
1010
author: John Anderson, Jefferson White
1111
1212
python_versions:

0 commit comments

Comments
 (0)