summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhochikong <1097225749@qq.com>2016-08-24 14:56:00 +0800
committerhochikong <1097225749@qq.com>2016-08-24 14:56:00 +0800
commita9d1a18af94f3e0f0ac669c51f3acfb1c03058f0 (patch)
tree06bac4c77b31280bce803ad48a8efcaa8f8b2728
parentaa8082393f42d5b10b910dfacdc5f57f59e7175f (diff)
downloadpython-vyos-mgmt-a9d1a18af94f3e0f0ac669c51f3acfb1c03058f0.tar.gz
python-vyos-mgmt-a9d1a18af94f3e0f0ac669c51f3acfb1c03058f0.zip
Fix some mistakes in README and check all codes by 2to3
-rwxr-xr-xREADME.md14
-rw-r--r--vymgmt/base_exceptions/__init__.py (renamed from vymgmt/base_exception/__init__.py)0
-rw-r--r--vymgmt/base_exceptions/base.py (renamed from vymgmt/base_exception/base.py)0
-rw-r--r--vymgmt/base_exceptions/exceptions_for_commit.py (renamed from vymgmt/base_exception/exception_for_commit.py)0
-rw-r--r--vymgmt/base_exceptions/exceptions_for_set_and_delete.py (renamed from vymgmt/base_exception/exceptions_for_set_and_delete.py)0
-rw-r--r--vymgmt/router.py8
6 files changed, 12 insertions, 10 deletions
diff --git a/README.md b/README.md
index e769a20..137bc40 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
#VyMGMT
A python library for VyOS configurations
-This python library is used for VyOS configurations.Use this library to send the configuration to VyOS.
+This python library is used for VyOS configurations.
+
+Use this library to send the configuration commands to VyOS.
##Note
###Version:0.1
@@ -107,19 +109,19 @@ config: "interfaces ethernet eth0 description 'eth0'"
The minimal configuration method.
#Exceptions
-##vymgmt.base\_exception.exception\_for\_commit.CommitFailed()
+##vymgmt.base\_exceptions.exceptions\_for\_commit.CommitFailed()
This exception class is for commit() failures due to some mistakes in your configurations.
When this exception raise,the error message from VyOS will displayed.
-##vymgmt.base\_exception.exception\_for\_commit.CommitConflict()
+##vymgmt.base\_exceptions.exceptions\_for\_commit.CommitConflict()
This exception class is for commit() failures due to the commit conflicts when more than one users committing their configurations at the same time.
When this exception raise,the error message from VyOS will displayed.
-##vymgmt.base\_exception.exceptions\_for\_set\_and\_delete.ConfigPathError()
+##vymgmt.base\_exceptions.exceptions\_for\_set\_and\_delete.ConfigPathError()
This exception class is for set() and delete() failures due to configuration path error.
@@ -140,7 +142,7 @@ The wrong one will raise this exception and display the error message:
When this exception raise,the error message from VyOS will displayed.
-##vymgmt.base\_exception.exceptions\_for\_set\_and\_delete.ConfigValueError()
+##vymgmt.base\_exceptions.exceptions\_for\_set\_and\_delete.ConfigValueError()
This exception class is for set() and delete() failures due to value error.
@@ -150,7 +152,7 @@ This exception will raise when your configuration has wrong value,such as:
When this exception raise,the error message from VyOS will displayed.
-##vymgmt.base_exception.CommonError()
+##vymgmt.base_exceptions.CommonError()
This exception class is for all failures which do not covered by exceptions above.
diff --git a/vymgmt/base_exception/__init__.py b/vymgmt/base_exceptions/__init__.py
index e69de29..e69de29 100644
--- a/vymgmt/base_exception/__init__.py
+++ b/vymgmt/base_exceptions/__init__.py
diff --git a/vymgmt/base_exception/base.py b/vymgmt/base_exceptions/base.py
index dc80840..dc80840 100644
--- a/vymgmt/base_exception/base.py
+++ b/vymgmt/base_exceptions/base.py
diff --git a/vymgmt/base_exception/exception_for_commit.py b/vymgmt/base_exceptions/exceptions_for_commit.py
index 26c14c4..26c14c4 100644
--- a/vymgmt/base_exception/exception_for_commit.py
+++ b/vymgmt/base_exceptions/exceptions_for_commit.py
diff --git a/vymgmt/base_exception/exceptions_for_set_and_delete.py b/vymgmt/base_exceptions/exceptions_for_set_and_delete.py
index 0f65c88..0f65c88 100644
--- a/vymgmt/base_exception/exceptions_for_set_and_delete.py
+++ b/vymgmt/base_exceptions/exceptions_for_set_and_delete.py
diff --git a/vymgmt/router.py b/vymgmt/router.py
index 955a9ba..f46955d 100644
--- a/vymgmt/router.py
+++ b/vymgmt/router.py
@@ -2,10 +2,10 @@
from pxssh import pxssh
-from mgmt_common import messenger, committer
-from .base_exception.exceptions_for_set_and_delete import ConfigPathError, ConfigValueError
-from .base_exception.exception_for_commit import CommitFailed, CommitConflict
-from .base_exception.base import CommonError
+from .mgmt_common import messenger, committer
+from .base_exceptions.exceptions_for_set_and_delete import ConfigPathError, ConfigValueError
+from .base_exceptions.exceptions_for_commit import CommitFailed, CommitConflict
+from .base_exceptions.base import CommonError
from .error_distinguish import distinguish_for_set, distinguish_for_delete, distinguish_for_commit