Skip to content

Commit 2536da5

Browse files
authored
Merge pull request #71 from elenabushneva/reservation-creation-named-args
fix reservation creation
2 parents 13ffdd8 + 07707cf commit 2536da5

4 files changed

Lines changed: 24 additions & 6 deletions

File tree

ns1/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,11 @@ def createReservation(
503503
import ns1.ipam
504504

505505
reservation = ns1.ipam.Reservation(
506-
self.config, scopegroup_id, address_id, dhcp_options, mac
506+
self.config,
507+
scopegroup_id,
508+
address_id,
509+
options=dhcp_options,
510+
mac=mac,
507511
)
508512

509513
return reservation.create(callback=callback, errback=errback, **kwargs)

ns1/ipam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def reserve(
348348
raise ScopegroupException("Scope Group not loaded")
349349

350350
reservation = Reservation(
351-
self.config, scopegroup_id, self.id, options, mac
351+
self.config, scopegroup_id, self.id, options=options, mac=mac
352352
)
353353

354354
return reservation.create(callback=callback, errback=errback)

ns1/rest/monitoring.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ class JobTypes(resource.BaseResource):
122122

123123
def list(self, callback=None, errback=None):
124124
return self._make_request(
125-
"GET", self.ROOT, callback=callback, errback=errback,
125+
"GET",
126+
self.ROOT,
127+
callback=callback,
128+
errback=errback,
126129
)
127130

128131

@@ -133,5 +136,8 @@ class Regions(resource.BaseResource):
133136

134137
def list(self, callback=None, errback=None):
135138
return self._make_request(
136-
"GET", self.ROOT, callback=callback, errback=errback,
139+
"GET",
140+
self.ROOT,
141+
callback=callback,
142+
errback=errback,
137143
)

setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@
2222
author_email="devteam@ns1.com",
2323
url="https://github.com/ns1/ns1-python",
2424
packages=find_packages(exclude=["tests", "examples"]),
25-
setup_requires=["pytest-runner", "wheel",],
26-
tests_require=["pytest", "pytest-pep8", "pytest-cov", "mock",],
25+
setup_requires=[
26+
"pytest-runner",
27+
"wheel",
28+
],
29+
tests_require=[
30+
"pytest",
31+
"pytest-pep8",
32+
"pytest-cov",
33+
"mock",
34+
],
2735
keywords="dns development rest sdk ns1 nsone",
2836
classifiers=[
2937
"Development Status :: 4 - Beta",

0 commit comments

Comments
 (0)