aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-09-22 21:53:55 +0200
committerMauro Sardara <msardara+fdio@cisco.com>2017-09-22 20:13:20 +0000
commit5221d15ea04d68fcd6492cc13cfe5ef3db92573a (patch)
treef337a82493e3b3ad998d464e470618fff203b506
parent96a98e1037619ecf876874c101de0db109da00ae (diff)
Fixing packaging support
Change-Id: I322e678a8fe455afc3325204062fb47fa45f5245 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
-rw-r--r--debian/changelog6
-rw-r--r--debian/control12
-rw-r--r--debian/netmon.postinst2
-rw-r--r--debian/python3-netmodel.postinst3
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/vicn.postinst3
-rw-r--r--scripts/build-package.sh (renamed from scripts/build_package.sh)17
-rw-r--r--scripts/version6
-rw-r--r--vicn/core/collection.py23
9 files changed, 49 insertions, 25 deletions
diff --git a/debian/changelog b/debian/changelog
index 90590ffb..cc91eb40 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
-vicn (1.0-25~g009e5b9~b1) UNRELEASED; urgency=medium
+vicn (0.1-1) UNRELEASED; urgency=medium
- * Initial release (Closes: #nnnn)
+ * Initial release. (Closes: #XXXXXX)
- -- Mauro Sardara <mauro.sardara@cisco.com> Tue, 18 Oct 2016 12:10:07 +0200
+ -- <testing@icn-ucs-1.cisco.com> Mon, 10 Jul 2017 11:07:54 +0200
diff --git a/debian/control b/debian/control
index 1dad2688..99e51ee9 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,4 @@
Source: vicn
-Version: 3.23
Section: python
Priority: optional
Maintainer: Jordan Augé <jordan.auge@cisco.com>
@@ -11,7 +10,6 @@ Vcs-Browser: https://gerrit.fd.io/r/gitweb?p=cicn.git
X-Python3-Version: >= 3.5
Package: python3-netmodel
-Version: 3.23
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-daemon, python3-lockfile, python3-setuptools, python3-pip
Suggests: python-netmodel-doc
@@ -19,15 +17,13 @@ Description: Netmodel
Netmodel
Package: netmon
-Version: 3.23
Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}, python3-netmodel
+Depends: ${python3:Depends}, ${misc:Depends}, python3-netmodel, bwm-ng
Suggests: netmon-doc
Description: Monitoring
Monitoring daemon
Package: vicn
-Version: 3.23
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-netmodel
Suggests: vicn-doc
@@ -51,9 +47,3 @@ Description: vICN experiment controller
The master, vICN, controls the whole cluster of servers, by means of HTTPS REST
APIs and remote SSH.
-#Package: vicn-resource-hicn
-#Architecture: all
-#Depends: vicn
-#Description: TODO
-# TODO
-
diff --git a/debian/netmon.postinst b/debian/netmon.postinst
index fdbfb95e..41df34c0 100644
--- a/debian/netmon.postinst
+++ b/debian/netmon.postinst
@@ -1,3 +1,3 @@
#!/bin/bash
-pip3 install --upgrade autobahn
+pip3 install --upgrade pylxd
diff --git a/debian/python3-netmodel.postinst b/debian/python3-netmodel.postinst
new file mode 100644
index 00000000..587f14b0
--- /dev/null
+++ b/debian/python3-netmodel.postinst
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+pip3 install --upgrade autobahn pyopenssl pylxd
diff --git a/debian/rules b/debian/rules
index 86a95b03..14bba467 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,6 @@
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
-override_dh_auto_test:
-
#override_dh_auto_build: export http_proxy=127.0.0.1:9
#override_dh_auto_build: export https_proxy=127.0.0.1:9
#override_dh_auto_build: dh_auto_build
diff --git a/debian/vicn.postinst b/debian/vicn.postinst
new file mode 100644
index 00000000..41df34c0
--- /dev/null
+++ b/debian/vicn.postinst
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+pip3 install --upgrade pylxd
diff --git a/scripts/build_package.sh b/scripts/build-package.sh
index 8189efdc..264b6ab6 100644
--- a/scripts/build_package.sh
+++ b/scripts/build-package.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+k#!/bin/bash
set -euxo pipefail
IFS=$'\n\t'
@@ -7,7 +7,8 @@ APT_PATH=`which apt-get` || true
apt_get=${APT_PATH:-"/usr/local/bin/apt-get"}
BUILD_TOOLS_UBUNTU="build-essential doxygen"
-DEPS_UBUNTU="devscripts debhelper python3-all python3-setuptools python3-docutils python3-sphinx python3-networkx python3-openssl python3-pyparsing python3-pip"
+DEPS_UBUNTU="devscripts debhelper python3-all python3-setuptools python3-docutils python3-sphinx python3-networkx python3-pyparsing python3-pip"
+DEPS_PYTHON="autobahn pyopenssl"
setup() {
@@ -47,6 +48,7 @@ build_package() {
# Install package dependencies
if [ $DISTRIB_ID == "Ubuntu" ]; then
echo $BUILD_TOOLS_UBUNTU $DEPS_UBUNTU | xargs sudo ${apt_get} install -y --allow-unauthenticated
+ echo $DEPS_PYTHON | xargs sudo pip3 install --upgrade
fi
# do nothing but print the current slave hostname
@@ -63,9 +65,15 @@ vicn ($VERSION) UNRELEASED; urgency=medium
-- Mauro Sardara <mauro.sardara@cisco.com> Tue, 18 Oct 2016 12:10:07 +0200
EOF
- pushd $SCRIPT_PATH/..
+ mkdir -p $SCRIPT_PATH/../vicn_build_root
+ ls -1 | while read line; do if [ "$line" != "$(basename $SCRIPT_PATH)" ]; then mv $line $SCRIPT_PATH/../vicn_build_root; fi done || true
+ cd $SCRIPT_PATH/../vicn_build_root
+
debuild --no-lintian --no-tgz-check -i -us -uc -b
- popd
+
+ cd $SCRIPT_PATH/..
+ mkdir build
+ mv *.deb build
echo "*******************************************************************"
echo "* $PACKAGE_NAME BUILD SUCCESSFULLY COMPLETED"
@@ -78,4 +86,3 @@ PACKAGE_NAME="VICN"
pushd $SCRIPT_PATH/..
build_package $PACKAGE_NAME
popd
-
diff --git a/scripts/version b/scripts/version
index dcf93d83..2f4c1d4a 100644
--- a/scripts/version
+++ b/scripts/version
@@ -7,7 +7,7 @@ cd "$path"
git rev-parse 2> /dev/null
if [ $? == 0 ]; then
- vstring=$(git describe --dirty --match "$version_prefix*" | sed "s/$version_prefix//")
+ vstring=$(git describe --match "$version_prefix*" | sed "s/$version_prefix//")
elif [ -f .version ]; then
vstring=$(cat .version)
else
@@ -23,7 +23,7 @@ ADD=$(echo ${vstring} | cut -s -d- -f2)
git rev-parse 2> /dev/null
if [ $? == 0 ]; then
- CMT=$(git describe --dirty --match "$version_prefix*" | sed "s/$version_prefix//" | cut -s -d- -f3,4)
+ CMT=$(git describe --match "$version_prefix*" | sed "s/$version_prefix//" | cut -s -d- -f3,4)
else
CMT=$(echo ${vstring} | cut -s -d- -f3,4)
fi
@@ -54,4 +54,4 @@ fi
fi
else
echo ${TAG}-release
-fi \ No newline at end of file
+fi
diff --git a/vicn/core/collection.py b/vicn/core/collection.py
new file mode 100644
index 00000000..fb222891
--- /dev/null
+++ b/vicn/core/collection.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2017 Cisco and/or its affiliates.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+from vicn.core.sa_collections import InstrumentedList
+from netmodel.model.collection import Collection
+
+class Collection(InstrumentedList, Collection):
+ pass