Skip to content

Commit 8883ca8

Browse files
committed
fixed copy pasta; added kwargs docs
1 parent 8c5ae68 commit 8883ca8

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

ns1/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,15 @@ def createReservation(
480480
errback=None,
481481
**kwargs
482482
):
483+
"""
484+
Create a new Reservation
485+
For the list of keywords available, see :attr:`ns1.rest.ipam.Reservation.INT_FIELDS` and :attr:`ns1.rest.ipam.Reservation.PASSTHRU_FIELDS`
486+
487+
:param int scopegroup_id: id of the scope group
488+
:param int address_id: id of the address the reservation is associated with
489+
:param str mac: mac address of the reservation
490+
:param list options: dhcp options of the reservation
491+
"""
483492
import ns1.ipam
484493

485494
reservation = ns1.ipam.Reservation(
@@ -508,6 +517,14 @@ def createScope(
508517
errback=None,
509518
**kwargs
510519
):
520+
"""
521+
Create a new Scope
522+
For the list of keywords available, see :attr:`ns1.rest.ipam.Scope.INT_FIELDS` and :attr:`ns1.rest.ipam.Scope.PASSTHRU_FIELDS`
523+
524+
:param int scopegroup_id: id of the scope group
525+
:param int address_id: id of the address the scope is associated with
526+
:param DHCPOptions options: DHCPOptions object that contains the settings for the scope
527+
"""
511528
import ns1.ipam
512529

513530
scope = ns1.ipam.Scope(

ns1/ipam.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, config, name=None, id=None, tags=None):
5353
:param ns1.config.Config config: config object
5454
:param str name: network name
5555
:param int id: id of an existing Network
56-
:param dict tags: tags of the reservation
56+
:param dict tags: tags of the network
5757
"""
5858
self._rest = Networks(config)
5959
self.config = config
@@ -201,7 +201,7 @@ def __init__(
201201
:param str status: planned, assigned
202202
:param Network network: Network Object the address will be part of
203203
:param Scopegroup scope_group: Scopegroup Object that will be associated with the address
204-
:param dict tags: tags of the reservation
204+
:param dict tags: tags of the address
205205
"""
206206
self._rest = Addresses(config)
207207
self.config = config
@@ -410,7 +410,7 @@ def __init__(self, config, name=None, service_def_id=None, id=None, tags=None):
410410
:param str name: Name of the scope group
411411
:param int service_group_id: id of the service group the scope group is associated with
412412
:param int id: id of the scope group
413-
:param dict tags: tags of the reservation
413+
:param dict tags: tags of the scpoegroup
414414
"""
415415
self._rest = Scopegroups(config)
416416
self.config = config
@@ -852,7 +852,7 @@ def __init__(
852852
:param int address_id: id of the address the scope is associated with
853853
:param int scope_id: id of the scope
854854
:param DHCPOptions options: DHCPOptions object that contains the settings for the scope
855-
:param dict tags: tags of the reservation
855+
:param dict tags: tags of the scope
856856
"""
857857
self._rest = Scopes(config)
858858
self.config = config

ns1/rest/ipam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Addresses(resource.BaseResource):
1616
" merged_address_id",
1717
"scope_group_id",
1818
]
19-
PASSTHRU_FIELDS = ["prefix", "status", "desc", "kvps", "tags", "reserve"]
19+
PASSTHRU_FIELDS = ["prefix", "status", "desc", "tags", "reserve"]
2020
BOOL_FIELDS = ["parent"]
2121

2222
def _buildBody(self, **kwargs):

0 commit comments

Comments
 (0)