Skip to content

Commit

Permalink
Merge pull request #59 from dragonfly-net/fix_otherwase
Browse files Browse the repository at this point in the history
fix typo otherwase
  • Loading branch information
jagter authored Oct 29, 2022
2 parents 8b356dd + 4c1ae03 commit ddece13
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion netbox/circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def delete_type(self, type_name):
"""Delete circuit type
:param type_name: circuit type to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
circuits_type_id = self.get_types(name=type_name)[0]['id']
Expand Down
4 changes: 2 additions & 2 deletions netbox/dcim.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def delete_site(self, site_name):
"""Delete site
:param site_name: Site to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
site_id = self.get_sites(name=site_name)[0]['id']
Expand All @@ -101,7 +101,7 @@ def delete_site_by_id(self, site_id):
"""Delete site
:param site_id: Site to delete
:return: bool True if succesful otherwase raise exception
:return: bool True if succesful otherwise raise exception
"""
return self.netbox_con.delete('/dcim/sites/', site_id)

Expand Down
8 changes: 4 additions & 4 deletions netbox/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def delete_config_context(self, name):
"""Delete config-context
:param name: Name of the config-context to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
config_context_id = self.get_config_contexts(name=name)[0]['id']
Expand All @@ -37,7 +37,7 @@ def delete_config_context_by_id(self, config_context_id):
"""Delete config-context
:param config_context_id: config-context to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
return self.netbox_con.delete('/extras/config-contexts/', config_context_id)

Expand Down Expand Up @@ -83,7 +83,7 @@ def delete_tag(self, name):
"""Delete tag
:param name: Name of the tag to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
tag_id = self.get_tags(name=name)[0]['id']
Expand All @@ -95,7 +95,7 @@ def delete_tag_by_id(self, tag_id):
"""Delete tag
:param tag_id: tag to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
return self.netbox_con.delete('/extras/tags/', tag_id)

Expand Down
8 changes: 4 additions & 4 deletions netbox/tenancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def delete_tenant(self, tenant_name):
"""Delete tenant
:param tenant_name: Tenant to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
tenant_id = self.get_tenants(name=tenant_name)[0]['id']
Expand All @@ -82,7 +82,7 @@ def delete_tenant_by_id(self, tenant_id):
"""Delete tenant
:param tenant_id: Tenant to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
return self.netbox_con.delete('/tenancy/tenants/', tenant_id)

Expand Down Expand Up @@ -127,7 +127,7 @@ def delete_tenant_group(self, tenant_group_name):
"""Delete tenant
:param tenant_group_name: Tenant group to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
tenant_group_id = self.get_tenant_groups(name=tenant_group_name)[0]['id']
Expand All @@ -139,7 +139,7 @@ def delete_tenant_group_id(self, tenant_group_id):
"""Delete tenant
:param tenant_group_id: Tenant group to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
return self.netbox_con.delete('/tenancy/tenant-groups/', tenant_group_id)

Expand Down
8 changes: 4 additions & 4 deletions netbox/virtualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def delete_cluster(self, name):
"""Delete a cluster
:param name: name of the cluster to delete
:return: netbox object if succesful otherwase delete exception
:return: netbox object if succesful otherwise delete exception
"""
try:
cluster_id = self.get_clusters(name=name)[0]['id']
Expand All @@ -49,7 +49,7 @@ def delete_cluster_by_id(self, cluster_id):
"""Delete a cluster
:param cluster_id: cluster to delete
:return: netbox object if succesful otherwase delete exception
:return: netbox object if succesful otherwise delete exception
"""
return self.netbox_con.delete('/virtualization/clusters/', cluster_id)

Expand Down Expand Up @@ -115,7 +115,7 @@ def delete_cluster_type(self, name):
"""Delete a cluster type
:param name: name of the cluster type to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
try:
cluster_type_id = self.get_cluster_types(name=name)[0]['id']
Expand All @@ -127,7 +127,7 @@ def delete_cluster_type_by_id(self, cluster_type_id):
"""Delete a cluster type
:param cluster_type_id: cluster type to delete
:return: bool True if succesful otherwase delete exception
:return: bool True if succesful otherwise delete exception
"""
return self.netbox_con.delete('/virtualization/cluster-types/', cluster_type_id)

Expand Down

0 comments on commit ddece13

Please sign in to comment.