aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2016-01-25 10:04:11 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-25 10:04:11 +0000
commit98640927866337bfd6637e250d4c28d3460dfcf1 (patch)
tree5bae3b60c1f3fcdac5b09bfe95e58cb55b622fe8
parentefa46a5b06c8c138aadbf396f6431acd7b606ed9 (diff)
parent1040118a7e3b4bb99f20a2fd594f2792629e11a2 (diff)
Merge "integrate yang2tosca to compass"
-rw-r--r--build/gen_ins_pkg_script.py11
-rwxr-xr-xbuild/make_repo.sh10
-rw-r--r--build/os/ubuntu/trusty/juno/Dockerfile.tmpl2
-rw-r--r--build/os/ubuntu/trusty/kilo/Dockerfile.tmpl2
-rw-r--r--build/os/ubuntu/trusty/liberty/Dockerfile.tmpl2
-rw-r--r--deploy/adapters/ansible/roles/common/vars/Debian.yml2
6 files changed, 15 insertions, 14 deletions
diff --git a/build/gen_ins_pkg_script.py b/build/gen_ins_pkg_script.py
index ec04c511..5e3d1737 100644
--- a/build/gen_ins_pkg_script.py
+++ b/build/gen_ins_pkg_script.py
@@ -35,7 +35,8 @@ def get_packages_name_list(file_list, special_packages):
for i in value:
if i in special_packages:
continue
- package_name_list.append(i)
+ if i not in package_name_list:
+ package_name_list.append(i)
return package_name_list
@@ -56,9 +57,11 @@ def generate_download_script(root="", arch="", tmpl="", docker_tmpl="", default_
searchList = {'scripts':make_script}
if os.path.exists(special_packages_dir):
special_packages_names=[]
- for i in os.listdir(special_packages_dir):
- if os.path.isfile(os.path.join(special_packages_dir, i)):
- special_packages_names.append(i)
+
+ for parent, dirname, filenames in os.walk(special_packages_dir):
+ for filename in filenames:
+ if os.path.isfile(os.path.join(parent, filename)):
+ special_packages_names.append(filename)
searchList.update({'spcial_packages':special_packages_names})
Dockerfile=os.path.basename(docker_tmpl).split('.')[0]
diff --git a/build/make_repo.sh b/build/make_repo.sh
index ad7ef228..550df7e3 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -137,7 +137,6 @@ function make_repo()
fi
sudo docker build --no-cache=true -t ${docker_tag} -f ${WORK_PATH}/work/repo/${dockerfile} ${WORK_PATH}/work/repo/
-
sudo docker run -t -v ${WORK_PATH}/work/repo:/result ${docker_tag}
image_id=$(sudo docker images|grep ${docker_tag}|awk '{print $3}')
@@ -176,20 +175,17 @@ function make_all_repo()
make_repo --os-ver trusty --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-switch keepalived" \
- --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
+ --special-package "openvswitch-switch"
make_repo --os-ver trusty --package-tag kilo \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-switch keepalived" \
- --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
+ --special-package "openvswitch-switch"
make_repo --os-ver trusty --package-tag liberty \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-switch keepalived" \
- --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
+ --special-package "openvswitch-switch"
make_repo --os-ver rhel7 --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
diff --git a/build/os/ubuntu/trusty/juno/Dockerfile.tmpl b/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
index 5972f883..ad14fa59 100644
--- a/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian-packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl b/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
index 5972f883..ad14fa59 100644
--- a/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian-packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl b/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
index 5972f883..ad14fa59 100644
--- a/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian-packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/deploy/adapters/ansible/roles/common/vars/Debian.yml b/deploy/adapters/ansible/roles/common/vars/Debian.yml
index 304517a6..af114ba4 100644
--- a/deploy/adapters/ansible/roles/common/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/common/vars/Debian.yml
@@ -6,11 +6,13 @@ packages:
- openvswitch-switch
- python-memcache
- python-iniparse
+ - python-lxml
- python-d* #TODO, need remove
pip_packages:
- crudini
- python-keyczar
+ - yang2tosca
pip_conf: pip.conf