summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rw-r--r--debian/control4
-rwxr-xr-xdebian/rules3
-rw-r--r--debian/vyatta-cfg.install1
-rw-r--r--python/setup.py20
-rw-r--r--python/vyos/__init__.py0
-rw-r--r--python/vyos/config/config.py119
7 files changed, 6 insertions, 146 deletions
diff --git a/debian/changelog b/debian/changelog
index 0c2b25a..0914c43 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+vyatta-cfg (0.102.0+vyos2+current3) unstable; urgency=low
+ * Move the python-vyos-mgmt library out of this package
+
+ -- Daniil Baturin <daniil@baturin.org> Fri, 18 Aug 2017 08:36:24 +0700
+
vyatta-cfg (0.102.0+vyos2+current2) unstable; urgency=low
[ Jason Hendry ]
diff --git a/debian/control b/debian/control
index 2048262..51fda59 100644
--- a/debian/control
+++ b/debian/control
@@ -4,8 +4,7 @@ Priority: extra
Maintainer: VyOS Package Maintainers <maintainers@vyos.net>
Build-Depends: debhelper (>= 5), autotools-dev, libglib2.0-dev,
libboost-filesystem1.55-dev, libapt-pkg-dev, libtool, flex,
- bison, libperl-dev, autoconf, automake, pkg-config, cpio, dh-autoreconf ,dh-systemd,
- python3-setuptools, dh-python, python3
+ bison, libperl-dev, autoconf, automake, pkg-config, cpio, dh-autoreconf ,dh-systemd
Standards-Version: 3.9.1
Package: vyatta-cfg
@@ -23,7 +22,6 @@ Depends: sed (>= 4.1.5),
libboost-filesystem1.55.0,
vyatta-quagga,
libapt-pkg4.12,
- python3,
${perl:Depends}, ${shlibs:Depends}
Suggests: util-linux (>= 2.13-5),
net-tools,
diff --git a/debian/rules b/debian/rules
index aa6b529..7734b11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,9 +5,6 @@ export DH_OPTIONS
## uncomment to enable hardening
#export DEB_BUILD_HARDENING=1
-export PYBUILD_SYSTEM=distutils
-export PYBUILD_DIR=python
-
cfg_opts := --prefix=/opt/vyatta
cfg_opts += --libdir=/usr/lib
cfg_opts += --includedir=/usr/include
diff --git a/debian/vyatta-cfg.install b/debian/vyatta-cfg.install
index 024be65..8c9aca2 100644
--- a/debian/vyatta-cfg.install
+++ b/debian/vyatta-cfg.install
@@ -3,5 +3,4 @@ opt/vyatta/share/enumeration
opt/vyatta/share/vyatta-cfg/functions
opt/vyatta/sbin
opt/vyatta/etc
-usr/lib/python3.4/dist-packages/vyos
bin
diff --git a/python/setup.py b/python/setup.py
deleted file mode 100644
index 9181ce0..0000000
--- a/python/setup.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import os
-from setuptools import setup
-
-setup(
- name = "vyos",
- version = "1.2.0",
- author = "VyOS maintainers and contributors",
- author_email = "maintainers@vyos.net",
- description = ("VyOS configuration libraries."),
- license = "MIT",
- keywords = "vyos",
- url = "http://vyos.io",
- packages=['vyos'],
- long_description="VyOS configuration libraries",
- classifiers=[
- "Development Status :: 3 - Alpha",
- "Topic :: Utilities",
- "License :: OSI Approved :: MIT License",
- ],
-)
diff --git a/python/vyos/__init__.py b/python/vyos/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/python/vyos/__init__.py
+++ /dev/null
diff --git a/python/vyos/config/config.py b/python/vyos/config/config.py
deleted file mode 100644
index a791555..0000000
--- a/python/vyos/config/config.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright (c) 2016 VyOS maintainers and contributors
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the Software
-# is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
-# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-# IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-import subprocess
-import re
-
-__cli_shell_api = '/bin/cli-shell-api'
-
-class VyOSError(Exception):
- pass
-
-
-def _make_command(op, path):
- args = path.split()
- cmd = [__cli_shell_api, op] + args
- return cmd
-
-def _run(cmd):
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- out = p.stdout.read()
- p.wait()
- if p.returncode != 0:
- raise VyOSError()
- else:
- return out
-
-
-def exists(path):
- try:
- _run(_make_command('exists', path))
- return True
- except VyOSError:
- return False
-
-def session_changed():
- try:
- _run(_make_command('sessionChanged', ''))
- return True
- except VyOSError:
- return False
-
-def in_session():
- try:
- _run(_make_command('inSession', ''))
- return True
- except VyOSError:
- return False
-
-def is_multi(path):
- try:
- _run(_make_command('isMulti', path))
- return True
- except VyOSError:
- return False
-
-def is_tag(path):
- try:
- _run(_make_command('isTag', path))
- return True
- except VyOSError:
- return False
-
-def is_leaf(path):
- try:
- _run(_make_command('isLeaf', path))
- return True
- except VyOSError:
- return False
-
-def return_value(path):
- if is_multi(path):
- raise VyOSError("Cannot use return_value on multi node: {0}".format(path))
- elif not is_leaf(path):
- raise VyOSError("Cannot use return_value on non-leaf node: {0}".format(path))
- else:
- try:
- out = _run(_make_command('returnValue', path))
- return out
- except VyOSError:
- raise VyOSError("Path doesn't exist: {0}".format(path))
-
-def return_values(path):
- if not is_multi(path):
- raise VyOSError("Cannot use return_values on non-multi node: {0}".format(path))
- elif not is_leaf(path):
- raise VyOSError("Cannot use return_values on non-leaf node: {0}".format(path))
- else:
- try:
- out = _run(_make_command('returnValues', path))
- return out
- except VyOSError:
- raise VyOSError("Path doesn't exist: {0}".format(path))
-
-def list_nodes(path):
- if is_tag(path):
- try:
- out = _run(_make_command('listNodes', path))
- values = out.split()
- return list(map(lambda x: re.sub(r'^\'(.*)\'$', r'\1',x), values))
- except VyOSError:
- raise VyOSError("Path doesn't exist: {0}".format(path))
- else:
- raise VyOSError("Cannot use list_nodes on a non-tag node: {0}".format(path))