diff options
author | baigk <baiguoku@huawei.com> | 2016-01-20 21:57:04 +0800 |
---|---|---|
committer | baigk <baiguoku@huawei.com> | 2016-01-25 07:34:18 +0000 |
commit | 1040118a7e3b4bb99f20a2fd594f2792629e11a2 (patch) | |
tree | 9aa671304b957f6a5f690d958eda52b2e1a976f7 | |
parent | 6c1adf0e4c442d1a97bb1d4ee5043937e6e596c8 (diff) |
integrate yang2tosca to compass
JITA: COMPASS-281
Change-Id: Ia2b4a7e915edc74dfb6359d1df513d23bec2731c
Signed-off-by: baigk <baiguoku@huawei.com>
-rw-r--r-- | build/gen_ins_pkg_script.py | 11 | ||||
-rwxr-xr-x | build/make_repo.sh | 10 | ||||
-rw-r--r-- | build/os/ubuntu/trusty/juno/Dockerfile.tmpl | 2 | ||||
-rw-r--r-- | build/os/ubuntu/trusty/kilo/Dockerfile.tmpl | 2 | ||||
-rw-r--r-- | build/os/ubuntu/trusty/liberty/Dockerfile.tmpl | 2 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/common/vars/Debian.yml | 2 |
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 |