From 4c1ae0362ba856001a8c71dda1640b78cc88f467 Mon Sep 17 00:00:00 2001 From: Denis Maksimov Date: Thu, 27 Oct 2022 05:12:54 +0300 Subject: [PATCH] fix typo otherwase --- netbox/circuits.py | 2 +- netbox/dcim.py | 4 ++-- netbox/extras.py | 8 ++++---- netbox/tenancy.py | 8 ++++---- netbox/virtualization.py | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/netbox/circuits.py b/netbox/circuits.py index 02c0290..f67023e 100644 --- a/netbox/circuits.py +++ b/netbox/circuits.py @@ -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'] diff --git a/netbox/dcim.py b/netbox/dcim.py index c662cd2..aab4762 100644 --- a/netbox/dcim.py +++ b/netbox/dcim.py @@ -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'] @@ -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) diff --git a/netbox/extras.py b/netbox/extras.py index 733b9ea..958c784 100644 --- a/netbox/extras.py +++ b/netbox/extras.py @@ -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'] @@ -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) @@ -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'] @@ -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) diff --git a/netbox/tenancy.py b/netbox/tenancy.py index 332e582..6ab9404 100644 --- a/netbox/tenancy.py +++ b/netbox/tenancy.py @@ -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'] @@ -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) @@ -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'] @@ -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) diff --git a/netbox/virtualization.py b/netbox/virtualization.py index 372cc70..2dcc7b7 100644 --- a/netbox/virtualization.py +++ b/netbox/virtualization.py @@ -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'] @@ -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) @@ -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'] @@ -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)