Reformat files to remove tabs
Change-Id: Ib99fbacd99d2a9dee4db69ba20c8b07443a90414
diff --git a/netconf/nc_rpc/base/commit.py b/netconf/nc_rpc/base/commit.py
index 35ea6e6..3192d6b 100644
--- a/netconf/nc_rpc/base/commit.py
+++ b/netconf/nc_rpc/base/commit.py
@@ -22,18 +22,18 @@
log = structlog.get_logger()
+
class Commit(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(Commit, self).__init__(request, request_xml, grpc_client,
+ session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(Commit, self).__init__(request, request_xml, grpc_client,
- session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('commit-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('commit-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/copy_config.py b/netconf/nc_rpc/base/copy_config.py
index 74519d3..772e8e9 100644
--- a/netconf/nc_rpc/base/copy_config.py
+++ b/netconf/nc_rpc/base/copy_config.py
@@ -21,18 +21,18 @@
log = structlog.get_logger()
+
class CopyConfig(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(CopyConfig, self).__init__(request, request_xml, grpc_client,
+ session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(CopyConfig, self).__init__(request, request_xml, grpc_client,
- session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('copy-config-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('copy-config-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/delete_config.py b/netconf/nc_rpc/base/delete_config.py
index d0135fe..9579db9 100644
--- a/netconf/nc_rpc/base/delete_config.py
+++ b/netconf/nc_rpc/base/delete_config.py
@@ -21,19 +21,18 @@
log = structlog.get_logger()
+
class DeleteConfig(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(DeleteConfig, self).__init__(request, request_xml,
+ grpc_client, session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session,
- capabilities):
- super(DeleteConfig, self).__init__(request, request_xml,
- grpc_client, session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('delete-config-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('delete-config-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/discard_changes.py b/netconf/nc_rpc/base/discard_changes.py
index 2855a6d..7a52248 100644
--- a/netconf/nc_rpc/base/discard_changes.py
+++ b/netconf/nc_rpc/base/discard_changes.py
@@ -21,19 +21,19 @@
log = structlog.get_logger()
+
class DiscardChanges(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(DiscardChanges, self).__init__(request, request_xml,
+ grpc_client, session,
+ capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session,
- capabilities):
- super(DiscardChanges, self).__init__(request, request_xml,
- grpc_client, session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('discard-changes-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('discard-changes-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/edit_config.py b/netconf/nc_rpc/base/edit_config.py
index 0fa6e5d..9d54c52 100644
--- a/netconf/nc_rpc/base/edit_config.py
+++ b/netconf/nc_rpc/base/edit_config.py
@@ -21,18 +21,18 @@
log = structlog.get_logger()
+
class EditConfig(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(EditConfig, self).__init__(request, request_xml, grpc_client,
+ session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(EditConfig, self).__init__(request, request_xml, grpc_client,
- session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('edit-config-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('edit-config-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/lock.py b/netconf/nc_rpc/base/lock.py
index 39de197..1905a71 100644
--- a/netconf/nc_rpc/base/lock.py
+++ b/netconf/nc_rpc/base/lock.py
@@ -21,17 +21,18 @@
log = structlog.get_logger()
+
class Lock(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(Lock, self).__init__(request, request_xml, grpc_client,
+ session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(Lock, self).__init__(request, request_xml, grpc_client,
- session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('Lock-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('Lock-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/unlock.py b/netconf/nc_rpc/base/unlock.py
index e2bc8e8..931c145 100644
--- a/netconf/nc_rpc/base/unlock.py
+++ b/netconf/nc_rpc/base/unlock.py
@@ -21,17 +21,18 @@
log = structlog.get_logger()
+
class UnLock(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(UnLock, self).__init__(request, request_xml, grpc_client,
+ session, capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(UnLock, self).__init__(request, request_xml, grpc_client,
- session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('UnLock-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('UnLock-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)
diff --git a/netconf/nc_rpc/base/validate.py b/netconf/nc_rpc/base/validate.py
index 309c00e..f8176a5 100644
--- a/netconf/nc_rpc/base/validate.py
+++ b/netconf/nc_rpc/base/validate.py
@@ -21,16 +21,18 @@
log = structlog.get_logger()
+
class Validate(Rpc):
+ def __init__(self, request, request_xml, grpc_client, session,
+ capabilities):
+ super(Validate, self).__init__(request, grpc_client, session,
+ capabilities)
+ self._validate_parameters()
- def __init__(self, request, request_xml, grpc_client, session, capabilities):
- super(Validate, self).__init__(request, grpc_client, session, capabilities)
- self._validate_parameters()
+ def execute(self):
+ log.info('Validate-request', session=self.session.session_id)
+ if self.rpc_response.is_error:
+ return self.rpc_response
- def execute(self):
- log.info('Validate-request', session=self.session.session_id)
- if self.rpc_response.is_error:
- return self.rpc_response
-
- def _validate_parameters(self):
- log.info('validate-parameters', session=self.session.session_id)
+ def _validate_parameters(self):
+ log.info('validate-parameters', session=self.session.session_id)