From d7964a17fb9391356c867bcae0ad938bf63b79a4 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Wed, 9 Jan 2019 14:48:12 -0600 Subject: [PATCH] Update openstack clients to stein/master python-aodhclient spec file is based off 1.1.1 (rocky) python-barbicanclient spec file is based off 4.7.1 (rocky) python-cinderclient spec file is based off 4.0.1 (rocky) python-glanceclient spec file is based off 2.13.1 (rocky) - docs disabled python-gnocchiclient spec file is based off 7.0.4 (rocky) python-heatclient spec file is based off 1.16.1 (rocky) - docs disabled python-ironicclient spec file is based off 2.5.0 (rocky) python-keystoneclient spec file is based off 3.17.0 (rocky) python-magnumclient spec file is based off 2.10.0 (rocky) python-muranoclient spec file is based off 1.1.1 (rocky) python-neutronclient spec file is based off 6.9.1 (rocky) python-novaclient spec file is based off 11.0.0 (rocky) - docs disabled python-openstackclient spec file is based off 3.16.2 (rocky) - docs disabled - unit tests disabled python-openstacksdk spec file is based of 0.17.2 (rocky) - unit tests disabled python-pankoclient spec file is based off 0.5.0 (rocky) The primary changes to each spec files are 1) version has tis extension 2) sdk package added 3) wheels package added Disable building: - openstack-aodh - python-osc-lib ceilometerclient no longer exists. openstack-heat no longer requires ceilometerclient Story: 2004751 Task: 28864 Change-Id: Ifa905bea2e95ded72a327f8ff43667c8c5429363 Depends-On: Iea58cb9484c75cf757397d53d7d1576a2f436d81 Signed-off-by: Al Bailey --- centos_iso_image.inc | 11 +- centos_pkg_dirs | 8 +- .../python-aodhclient/centos/build_srpm.data | 4 +- .../centos/meta_patches/0001-spec.patch | 21 - .../centos/meta_patches/PATCH_ORDER | 1 - .../centos/patches/0001-fix-interface.patch | 15 - .../centos/python-aodhclient.spec | 207 ++ .../centos/python-aodhclient.spec.orig | 176 ++ openstack/python-aodhclient/centos/srpm_path | 1 - .../centos/build_srpm.data | 3 + .../centos/python-barbicanclient.spec | 182 ++ .../centos/python-barbicanclient.spec.orig | 152 ++ .../centos/build_srpm.data | 10 - .../centos/python-ceilometerclient.spec | 207 -- .../centos/build_srpm.data | 9 +- .../centos/python-cinderclient.spec | 80 +- .../centos/python-cinderclient.spec.orig | 166 ++ .../centos/build_srpm.data | 4 +- .../centos/files/image-backup.sh | 209 -- .../centos/python-glanceclient.spec | 130 +- .../centos/python-glanceclient.spec.orig | 190 ++ .../centos/build_srpm.data | 6 +- .../centos/python-gnocchiclient.spec | 48 +- .../centos/python-gnocchiclient.spec.orig | 220 ++ .../openstack-heat/centos/openstack-heat.spec | 2 - .../python-heatclient/centos/build_srpm.data | 5 +- ...age-versioning-format-for-TiS-format.patch | 25 - ...0002-Packages-sdk-for-remote-clients.patch | 51 - .../0003-Apply-timezone-support-patch.patch | 37 - .../centos/meta_patches/PATCH_ORDER | 3 - ...0001-timezone-support-for-heatclient.patch | 224 -- .../centos/python-heatclient.spec | 230 +++ .../centos/python-heatclient.spec.orig | 185 ++ openstack/python-heatclient/centos/srpm_path | 2 - .../centos/build_srpm.data | 4 +- .../centos/python-ironicclient.spec | 69 +- .../centos/python-ironicclient.spec.orig | 138 ++ .../centos/build_srpm.data | 5 +- ...te-package-versioning-for-TIS-format.patch | 13 - .../0002-meta-public-adminURL-detection.patch | 16 - ...003-meta-TiS-remote-client-sdk-patch.patch | 47 - ...04-meta-dont-remove-requirements-txt.patch | 13 - ...-buildrequires-python-setuptools_scm.patch | 20 - .../centos/meta_patches/PATCH_ORDER | 5 - ...one-client-public-adminURL-detection.patch | 55 - .../centos/python-keystoneclient.spec | 278 +++ .../centos/python-keystoneclient.spec.orig | 247 +++ .../python-keystoneclient/centos/srpm_path | 1 - .../CGCSkeyringsupport.patch | 144 -- .../extend_token_expiry_window.patch | 16 - ...one-client-public-adminURL-detection.patch | 45 - .../v2-client-empty-password-check.patch | 26 - .../centos/build_srpm.data | 4 +- .../centos/python-magnumclient.spec | 165 +- .../centos/python-magnumclient.spec.orig | 250 +++ .../centos/build_srpm.data | 4 +- .../centos/python-muranoclient.spec | 126 +- .../centos/python-muranoclient.spec.orig | 182 ++ .../centos/python-networking-sfc.spec | 8 + .../centos/build_srpm.data | 3 +- .../centos/python-neutronclient.spec | 220 +- .../centos/python-neutronclient.spec.orig | 233 +++ .../python-novaclient/centos/build_srpm.data | 3 +- .../centos/python-novaclient.spec | 130 +- .../centos/python-novaclient.spec.orig | 164 ++ .../centos/build_srpm.data | 4 +- ...te-package-versioning-for-TIS-format.patch | 13 - .../0002-spec-remote-clients-sdk.patch | 42 - ...03-meta-dont-remove-requirements-txt.patch | 13 - ...added-missing-build-require-dateutil.patch | 12 - ...05-meta-patch-for-neutron-extensions.patch | 14 - ...enstackClient_Passwordchange_warning.patch | 12 - ...g-only-when-the-admin-password-chang.patch | 12 - ...-keystone-region-name-to-identity-cl.patch | 25 - .../1000-remove-version-requirements.patch | 33 - .../1001-Turn-off-openstackclient-check.patch | 36 - .../meta_patches/1002-meta-us101470.patch | 24 - .../meta_patches/1003-meta-us101470.patch | 24 - ...meta-US106901-Openstack-CLI-Adoption.patch | 25 - ...meta-US106901-Openstack-CLI-Adoption.patch | 25 - .../1006-meta-patch-for-endpoint-groups.patch | 26 - ...wrs-binding-vif_model-using-osclient.patch | 23 - ...ng-mac_filtering-and-setting-extensi.patch | 24 - .../centos/meta_patches/PATCH_ORDER | 17 - ...wrs-binding-vif_model-using-osclient.patch | 64 - ...-keystone-region-name-to-identity-cl.patch | 27 - .../0001-Optimize-getting-endpoint-list.patch | 99 - ...ng-mac_filtering-and-setting-extensi.patch | 231 --- ...ckclient-implementation-of-novaclien.patch | 232 --- ...0001-US106901-Openstack-CLI-Adoption.patch | 80 - .../patches/0001-neutron-extensions.patch | 1822 ----------------- ...support-for-endpoing-filter-commands.patch | 614 ------ ...ckclient-implementation-of-novaclien.patch | 273 --- ...0002-US106901-Openstack-CLI-Adoption.patch | 330 --- ...-support-for-endpoint-group-commands.patch | 472 ----- ...g-only-when-the-admin-password-chang.patch | 42 - ...enstackClient_Passwordchange_warning.patch | 22 - .../centos/python-openstackclient.spec | 304 +++ .../centos/python-openstackclient.spec.orig | 268 +++ .../python-openstackclient/centos/srpm_path | 1 - .../centos/build_srpm.data | 4 +- .../centos/python-openstacksdk.spec | 217 +- .../centos/python-openstacksdk.spec.orig | 254 +++ .../python-pankoclient/centos/build_srpm.data | 3 + .../centos/python-pankoclient.spec | 237 +++ .../centos/python-pankoclient.spec.orig | 204 ++ 106 files changed, 5196 insertions(+), 6466 deletions(-) delete mode 100644 openstack/python-aodhclient/centos/meta_patches/0001-spec.patch delete mode 100644 openstack/python-aodhclient/centos/meta_patches/PATCH_ORDER delete mode 100644 openstack/python-aodhclient/centos/patches/0001-fix-interface.patch create mode 100644 openstack/python-aodhclient/centos/python-aodhclient.spec create mode 100644 openstack/python-aodhclient/centos/python-aodhclient.spec.orig delete mode 100644 openstack/python-aodhclient/centos/srpm_path create mode 100644 openstack/python-barbicanclient/centos/build_srpm.data create mode 100644 openstack/python-barbicanclient/centos/python-barbicanclient.spec create mode 100644 openstack/python-barbicanclient/centos/python-barbicanclient.spec.orig delete mode 100644 openstack/python-ceilometerclient/centos/build_srpm.data delete mode 100644 openstack/python-ceilometerclient/centos/python-ceilometerclient.spec create mode 100644 openstack/python-cinderclient/centos/python-cinderclient.spec.orig delete mode 100644 openstack/python-glanceclient/centos/files/image-backup.sh create mode 100644 openstack/python-glanceclient/centos/python-glanceclient.spec.orig create mode 100644 openstack/python-gnocchiclient/centos/python-gnocchiclient.spec.orig delete mode 100644 openstack/python-heatclient/centos/meta_patches/0001-Update-package-versioning-format-for-TiS-format.patch delete mode 100644 openstack/python-heatclient/centos/meta_patches/0002-Packages-sdk-for-remote-clients.patch delete mode 100644 openstack/python-heatclient/centos/meta_patches/0003-Apply-timezone-support-patch.patch delete mode 100644 openstack/python-heatclient/centos/meta_patches/PATCH_ORDER delete mode 100644 openstack/python-heatclient/centos/patches/0001-timezone-support-for-heatclient.patch create mode 100644 openstack/python-heatclient/centos/python-heatclient.spec create mode 100644 openstack/python-heatclient/centos/python-heatclient.spec.orig delete mode 100644 openstack/python-heatclient/centos/srpm_path create mode 100644 openstack/python-ironicclient/centos/python-ironicclient.spec.orig delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/0002-meta-public-adminURL-detection.patch delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/0003-meta-TiS-remote-client-sdk-patch.patch delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/0004-meta-dont-remove-requirements-txt.patch delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/0006-meta-buildrequires-python-setuptools_scm.patch delete mode 100644 openstack/python-keystoneclient/centos/meta_patches/PATCH_ORDER delete mode 100644 openstack/python-keystoneclient/centos/patches/internal-keystone-client-public-adminURL-detection.patch create mode 100644 openstack/python-keystoneclient/centos/python-keystoneclient.spec create mode 100644 openstack/python-keystoneclient/centos/python-keystoneclient.spec.orig delete mode 100644 openstack/python-keystoneclient/centos/srpm_path delete mode 100644 openstack/python-keystoneclient/python-keystoneclient/CGCSkeyringsupport.patch delete mode 100644 openstack/python-keystoneclient/python-keystoneclient/extend_token_expiry_window.patch delete mode 100644 openstack/python-keystoneclient/python-keystoneclient/internal-keystone-client-public-adminURL-detection.patch delete mode 100644 openstack/python-keystoneclient/python-keystoneclient/v2-client-empty-password-check.patch create mode 100644 openstack/python-magnumclient/centos/python-magnumclient.spec.orig create mode 100644 openstack/python-muranoclient/centos/python-muranoclient.spec.orig create mode 100644 openstack/python-neutronclient/centos/python-neutronclient.spec.orig create mode 100644 openstack/python-novaclient/centos/python-novaclient.spec.orig delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0002-spec-remote-clients-sdk.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0003-meta-dont-remove-requirements-txt.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0004-added-missing-build-require-dateutil.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0005-meta-patch-for-neutron-extensions.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0006-openstackClient_Passwordchange_warning.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0007-CGTS-7814-warning-only-when-the-admin-password-chang.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/0008-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1000-remove-version-requirements.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1001-Turn-off-openstackclient-check.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1002-meta-us101470.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1003-meta-us101470.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1004-meta-US106901-Openstack-CLI-Adoption.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1005-meta-US106901-Openstack-CLI-Adoption.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1006-meta-patch-for-endpoint-groups.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1007-Allow-setting-wrs-binding-vif_model-using-osclient.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/1008-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch delete mode 100644 openstack/python-openstackclient/centos/meta_patches/PATCH_ORDER delete mode 100644 openstack/python-openstackclient/centos/patches/0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-Optimize-getting-endpoint-list.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-US101470-Openstackclient-implementation-of-novaclien.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-US106901-Openstack-CLI-Adoption.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0001-neutron-extensions.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0002-Add-support-for-endpoing-filter-commands.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0002-US101470-Openstackclient-implementation-of-novaclien.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0002-US106901-Openstack-CLI-Adoption.patch delete mode 100644 openstack/python-openstackclient/centos/patches/0003-Add-support-for-endpoint-group-commands.patch delete mode 100644 openstack/python-openstackclient/centos/patches/CGTS-7814-warning-only-when-the-admin-password-chang.patch delete mode 100644 openstack/python-openstackclient/centos/patches/openstackClient_Passwordchange_warning.patch create mode 100644 openstack/python-openstackclient/centos/python-openstackclient.spec create mode 100644 openstack/python-openstackclient/centos/python-openstackclient.spec.orig delete mode 100644 openstack/python-openstackclient/centos/srpm_path create mode 100644 openstack/python-openstacksdk/centos/python-openstacksdk.spec.orig create mode 100644 openstack/python-pankoclient/centos/build_srpm.data create mode 100644 openstack/python-pankoclient/centos/python-pankoclient.spec create mode 100644 openstack/python-pankoclient/centos/python-pankoclient.spec.orig diff --git a/centos_iso_image.inc b/centos_iso_image.inc index 70f5a461..f7aec6d9 100644 --- a/centos_iso_image.inc +++ b/centos_iso_image.inc @@ -40,7 +40,7 @@ python2-ironicclient # python-magnumclient python2-magnumclient python-magnumclient-doc -python-magnumclient-tests +# python-magnumclient-tests # openstack-magnum python-magnum @@ -147,15 +147,6 @@ distributedcloud-dcorch # distributedcloud-client distributedcloud-client-dcmanagerclient -# openstack-aodh -openstack-aodh-compat -openstack-aodh-api -openstack-aodh-evaluator -openstack-aodh-notifier -openstack-aodh-listener -openstack-aodh-expirer -openstack-aodh-config - # openstack-panko python-panko openstack-panko-api diff --git a/centos_pkg_dirs b/centos_pkg_dirs index 2abea092..3448234d 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -1,5 +1,3 @@ -openstack/openstack-aodh -openstack/openstack-aodh-config openstack/openstack-murano openstack/python-muranoclient openstack/openstack-murano-ui @@ -13,8 +11,8 @@ openstack/openstack-panko openstack/openstack-panko-config openstack/openstack-os-vif openstack/python-aodhclient +openstack/python-barbicanclient openstack/python-ceilometer -openstack/python-ceilometerclient openstack/python-cinder openstack/python-cinderclient openstack/python-glance @@ -28,7 +26,6 @@ openstack/python-heatclient openstack/python-horizon openstack/python-keystone openstack/python-keystoneclient -openstack/python-keystonemiddleware openstack/python-networking-bgpvpn openstack/python-networking-sfc openstack/python-networking-odl @@ -42,11 +39,10 @@ openstack/python-openstackdocstheme openstack/python-oslo-concurrency openstack/python-oslo-service openstack/python-oslo-messaging +openstack/python-pankoclient openstack/rabbitmq-server openstack/rabbitmq-server-config -openstack/python-keystoneauth1 openstack/python-openstackclient -openstack/python-osc-lib openstack/python-openstacksdk openstack/python-django-openstack-auth openstack/python-wsme diff --git a/openstack/python-aodhclient/centos/build_srpm.data b/openstack/python-aodhclient/centos/build_srpm.data index 8aeb5536..b69c6a4e 100644 --- a/openstack/python-aodhclient/centos/build_srpm.data +++ b/openstack/python-aodhclient/centos/build_srpm.data @@ -1 +1,3 @@ -TIS_PATCH_VER=1 +TAR_NAME=aodhclient +SRC_DIR=$CGCS_BASE/git/python-aodhclient +TIS_PATCH_VER=0 diff --git a/openstack/python-aodhclient/centos/meta_patches/0001-spec.patch b/openstack/python-aodhclient/centos/meta_patches/0001-spec.patch deleted file mode 100644 index b57a41b2..00000000 --- a/openstack/python-aodhclient/centos/meta_patches/0001-spec.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/SPECS/python-aodhclient.spec b/SPECS/python-aodhclient.spec -index 5d60fe2..ec5afaa 100644 ---- a/SPECS/python-aodhclient.spec -+++ b/SPECS/python-aodhclient.spec -@@ -8,13 +8,15 @@ - - Name: python-aodhclient - Version: 0.9.0 --Release: 1%{?dist} -+Release: 1%{?_tis_dist}.%{tis_patch_ver} - Summary: Python API and CLI for OpenStack Aodh - - License: ASL 2.0 - URL: https://launchpad.net/python-aodhclient - Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz - -+Patch0: 0001-fix-interface.patch -+ - BuildArch: noarch - - %description diff --git a/openstack/python-aodhclient/centos/meta_patches/PATCH_ORDER b/openstack/python-aodhclient/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 070ee512..00000000 --- a/openstack/python-aodhclient/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1 +0,0 @@ -0001-spec.patch diff --git a/openstack/python-aodhclient/centos/patches/0001-fix-interface.patch b/openstack/python-aodhclient/centos/patches/0001-fix-interface.patch deleted file mode 100644 index 25597eee..00000000 --- a/openstack/python-aodhclient/centos/patches/0001-fix-interface.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/aodhclient/osc.py b/aodhclient/osc.py -index 1e8599f..a1ecfee 100644 ---- a/aodhclient/osc.py -+++ b/aodhclient/osc.py -@@ -39,7 +39,9 @@ def make_client(instance): - API_VERSIONS) - # NOTE(sileht): ensure setup of the session is done - instance.setup_auth() -- return aodh_client(session=instance.session) -+ return aodh_client(session=instance.session, -+ interface=instance.interface, -+ region_name=instance.region_name) - - - def build_option_parser(parser): diff --git a/openstack/python-aodhclient/centos/python-aodhclient.spec b/openstack/python-aodhclient/centos/python-aodhclient.spec new file mode 100644 index 00000000..7b04fea1 --- /dev/null +++ b/openstack/python-aodhclient/centos/python-aodhclient.spec @@ -0,0 +1,207 @@ +%global pypi_name aodhclient + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global common_desc \ +This is a client library for Aodh built on the Aodh API. It \ +provides a Python API (the aodhclient module) and a command-line tool. + +Name: python-aodhclient +Version: 1.1.1 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: Python API and CLI for OpenStack Aodh + +License: ASL 2.0 +URL: https://launchpad.net/python-aodhclient +Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{pypi_name} +Summary: Python API and CLI for OpenStack Aodh +%{?python_provide:%python_provide python2-%{pypi_name}} + +BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: git + +Requires: python-pbr +Requires: python-cliff >= 1.14.0 +Requires: python-oslo-i18n >= 1.5.0 +Requires: python-oslo-serialization >= 1.4.0 +Requires: python-oslo-utils >= 2.0.0 +Requires: python-keystoneauth1 >= 1.0.0 +Requires: python-six >= 1.9.0 +Requires: python-osc-lib >= 1.0.1 +Requires: pyparsing + +%description -n python2-%{pypi_name} +%{common_desc} + + +%package doc +Summary: Documentation for OpenStack Aodh API Client + +BuildRequires: python-sphinx +# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-c +BuildRequires: python-oslo-sphinx +BuildRequires: python-openstackdocstheme +BuildRequires: python-keystoneauth1 +BuildRequires: python-oslo-utils +BuildRequires: python-oslo-serialization +BuildRequires: python-cliff + + +%description doc +%{common_desc} +(aodh). + +This package contains auto-generated documentation. + +%package -n python2-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Aodh Tests +Requires: python2-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Python API and CLI for OpenStack Aodh + +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-pbr + +Requires: python3-pbr +Requires: python3-cliff >= 1.14.0 +Requires: python3-oslo-i18n >= 1.5.0 +Requires: python3-oslo-serialization >= 1.4.0 +Requires: python3-oslo-utils >= 2.0.0 +Requires: python3-keystoneauth1 >= 1.0.0 +Requires: python3-six >= 1.9.0 +Requires: python3-osc-lib >= 1.0.1 +Requires: python3-pyparsing + +%description -n python3-%{pypi_name} +%{common_desc} + +%package -n python3-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Aodh Tests +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +%{common_desc} + +%endif + +%prep +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +%py3_build +%endif + +%install +export PBR_VERSION=%{version} +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python3_version} +ln -s ./aodh-%{python3_version} %{buildroot}%{_bindir}/aodh-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python2_version} +ln -s ./aodh-%{python2_version} %{buildroot}%{_bindir}/aodh-2 + +ln -s ./aodh-2 %{buildroot}%{_bindir}/aodh + +export PYTHONPATH=. +sphinx-build -b html doc/source doc/build/html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{pypi_name}-%{version} + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{python2_sitelib}/aodhclient +%{python2_sitelib}/*.egg-info +%{_bindir}/aodh +%{_bindir}/aodh-2 +%{_bindir}/aodh-%{python2_version} +%exclude %{python2_sitelib}/aodhclient/tests + +%files -n python2-%{pypi_name}-tests +%license LICENSE +%{python2_sitelib}/aodhclient/tests + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/*.egg-info +%{_bindir}/aodh-3 +%{_bindir}/aodh-%{python3_version} +%exclude %{python3_sitelib}/aodhclient/tests + +%files -n python3-%{pypi_name}-tests +%license LICENSE +%{python3_sitelib}/aodhclient/tests +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%package sdk +Summary: SDK files for %{pypi_name} + +%description sdk +Contains SDK files for %{pypi_name} package + +%files sdk +/usr/share/remote-clients/%{pypi_name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + +%changelog +* Thu Aug 09 2018 RDO 1.1.1-1 +- Update to 1.1.1 + diff --git a/openstack/python-aodhclient/centos/python-aodhclient.spec.orig b/openstack/python-aodhclient/centos/python-aodhclient.spec.orig new file mode 100644 index 00000000..1057b01f --- /dev/null +++ b/openstack/python-aodhclient/centos/python-aodhclient.spec.orig @@ -0,0 +1,176 @@ +%global pypi_name aodhclient + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global common_desc \ +This is a client library for Aodh built on the Aodh API. It \ +provides a Python API (the aodhclient module) and a command-line tool. + +Name: python-aodhclient +Version: 1.1.1 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Aodh + +License: ASL 2.0 +URL: https://launchpad.net/python-aodhclient +Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{pypi_name} +Summary: Python API and CLI for OpenStack Aodh +%{?python_provide:%python_provide python2-%{pypi_name}} + +BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: git + +Requires: python-pbr +Requires: python-cliff >= 1.14.0 +Requires: python-oslo-i18n >= 1.5.0 +Requires: python-oslo-serialization >= 1.4.0 +Requires: python-oslo-utils >= 2.0.0 +Requires: python-keystoneauth1 >= 1.0.0 +Requires: python-six >= 1.9.0 +Requires: python-osc-lib >= 1.0.1 +Requires: pyparsing + +%description -n python2-%{pypi_name} +%{common_desc} + + +%package doc +Summary: Documentation for OpenStack Aodh API Client + +BuildRequires: python-sphinx +# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-c +BuildRequires: python-oslo-sphinx +BuildRequires: python-openstackdocstheme +BuildRequires: python-keystoneauth1 +BuildRequires: python-oslo-utils +BuildRequires: python-oslo-serialization +BuildRequires: python-cliff + + +%description doc +%{common_desc} +(aodh). + +This package contains auto-generated documentation. + +%package -n python2-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Aodh Tests +Requires: python2-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Python API and CLI for OpenStack Aodh + +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-setuptools +BuildRequires: python3-devel +BuildRequires: python3-pbr + +Requires: python3-pbr +Requires: python3-cliff >= 1.14.0 +Requires: python3-oslo-i18n >= 1.5.0 +Requires: python3-oslo-serialization >= 1.4.0 +Requires: python3-oslo-utils >= 2.0.0 +Requires: python3-keystoneauth1 >= 1.0.0 +Requires: python3-six >= 1.9.0 +Requires: python3-osc-lib >= 1.0.1 +Requires: python3-pyparsing + +%description -n python3-%{pypi_name} +%{common_desc} + +%package -n python3-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Aodh Tests +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +%{common_desc} + +%endif + +%prep +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python3_version} +ln -s ./aodh-%{python3_version} %{buildroot}%{_bindir}/aodh-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/aodh %{buildroot}%{_bindir}/aodh-%{python2_version} +ln -s ./aodh-%{python2_version} %{buildroot}%{_bindir}/aodh-2 + +ln -s ./aodh-2 %{buildroot}%{_bindir}/aodh + +export PYTHONPATH=. +sphinx-build -b html doc/source doc/build/html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{python2_sitelib}/aodhclient +%{python2_sitelib}/*.egg-info +%{_bindir}/aodh +%{_bindir}/aodh-2 +%{_bindir}/aodh-%{python2_version} +%exclude %{python2_sitelib}/aodhclient/tests + +%files -n python2-%{pypi_name}-tests +%license LICENSE +%{python2_sitelib}/aodhclient/tests + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/*.egg-info +%{_bindir}/aodh-3 +%{_bindir}/aodh-%{python3_version} +%exclude %{python3_sitelib}/aodhclient/tests + +%files -n python3-%{pypi_name}-tests +%license LICENSE +%{python3_sitelib}/aodhclient/tests +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%changelog +* Thu Aug 09 2018 RDO 1.1.1-1 +- Update to 1.1.1 + diff --git a/openstack/python-aodhclient/centos/srpm_path b/openstack/python-aodhclient/centos/srpm_path deleted file mode 100644 index 27c93c6d..00000000 --- a/openstack/python-aodhclient/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-aodhclient-0.9.0-1.el7.src.rpm diff --git a/openstack/python-barbicanclient/centos/build_srpm.data b/openstack/python-barbicanclient/centos/build_srpm.data new file mode 100644 index 00000000..000289a6 --- /dev/null +++ b/openstack/python-barbicanclient/centos/build_srpm.data @@ -0,0 +1,3 @@ +TAR_NAME=python-barbicanclient +SRC_DIR=$CGCS_BASE/git/python-barbicanclient +TIS_PATCH_VER=0 diff --git a/openstack/python-barbicanclient/centos/python-barbicanclient.spec b/openstack/python-barbicanclient/centos/python-barbicanclient.spec new file mode 100644 index 00000000..ffd3b4e9 --- /dev/null +++ b/openstack/python-barbicanclient/centos/python-barbicanclient.spec @@ -0,0 +1,182 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname barbicanclient +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the Barbican Key Management API. There is a \ +Python library for accessing the API (barbicanclient module), and \ +a command-line script (barbican). + +Name: python-barbicanclient +Version: 4.7.1 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: Client Library for OpenStack Barbican Key Management API + +License: ASL 2.0 +URL: https://pypi.python.org/pypi/python-barbicanclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + + +%description +%{common_desc} + + +%package -n python2-%{sname} +Summary: Client Library for OpenStack Barbican Key Management API + +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-setuptools +BuildRequires: git + +Requires: python2-requests +Requires: python2-six >= 1.10.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-prettytable +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-pbr >= 2.0.0 +%if 0%{?fedora} > 0 +Requires: python2-cliff +%else +Requires: python-cliff +%endif + +%{?python_provide:%python_provide python2-%{sname}} + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Client Library for OpenStack Barbican Key Management API + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools + +Requires: python3-requests +Requires: python3-six >= 1.10.0 +Requires: python3-cliff +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-prettytable +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-pbr >= 2.0.0 + +%{?python_provide:%python_provide python3-%{sname}} + +%description -n python3-%{sname} +%{common_desc} +%endif + + +%package doc +Summary: Documentation for OpenStack Barbican API client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-i18n +BuildRequires: python2-prettytable + +%description doc +Documentation for the barbicanclient module + +%prep +%autosetup -n %{name}-%{upstream_version} -S git +# let RPM handle deps +sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py + +rm -rf {test-,}requirements.txt + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +%py3_build +%endif + +# doc +%{__python2} setup.py build_sphinx -b html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.buildinfo + +%install +export PBR_VERSION=%{version} +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python3_version} +ln -s ./barbican-%{python3_version} %{buildroot}%{_bindir}/barbican-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python2_version} +ln -s ./barbican-%{python2_version} %{buildroot}%{_bindir}/barbican-2 +ln -s ./barbican-2 %{buildroot}%{_bindir}/barbican + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + +%files -n python2-%{sname} +%license LICENSE +%doc AUTHORS CONTRIBUTING.rst README.rst ChangeLog +%{_bindir}/barbican +%{_bindir}/barbican-2* +%{python2_sitelib}/barbicanclient +%{python2_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc AUTHORS CONTRIBUTING.rst README.rst ChangeLog +%{_bindir}/barbican-3* +%{python3_sitelib}/barbicanclient +%{python3_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + +%files sdk +/usr/share/remote-clients/%{name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + +%changelog +* Tue Nov 27 2018 RDO 4.7.1-1 +- Update to 4.7.1 + +* Wed Aug 08 2018 RDO 4.7.0-1 +- Update to 4.7.0 + diff --git a/openstack/python-barbicanclient/centos/python-barbicanclient.spec.orig b/openstack/python-barbicanclient/centos/python-barbicanclient.spec.orig new file mode 100644 index 00000000..5d8dcfcc --- /dev/null +++ b/openstack/python-barbicanclient/centos/python-barbicanclient.spec.orig @@ -0,0 +1,152 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname barbicanclient +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the Barbican Key Management API. There is a \ +Python library for accessing the API (barbicanclient module), and \ +a command-line script (barbican). + +Name: python-barbicanclient +Version: 4.7.1 +Release: 1%{?dist} +Summary: Client Library for OpenStack Barbican Key Management API + +License: ASL 2.0 +URL: https://pypi.python.org/pypi/python-barbicanclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + + +%description +%{common_desc} + + +%package -n python2-%{sname} +Summary: Client Library for OpenStack Barbican Key Management API + +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-setuptools +BuildRequires: git + +Requires: python2-requests +Requires: python2-six >= 1.10.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-prettytable +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-pbr >= 2.0.0 +%if 0%{?fedora} > 0 +Requires: python2-cliff +%else +Requires: python-cliff +%endif + +%{?python_provide:%python_provide python2-%{sname}} + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Client Library for OpenStack Barbican Key Management API + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools + +Requires: python3-requests +Requires: python3-six >= 1.10.0 +Requires: python3-cliff +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-prettytable +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-pbr >= 2.0.0 + +%{?python_provide:%python_provide python3-%{sname}} + +%description -n python3-%{sname} +%{common_desc} +%endif + + +%package doc +Summary: Documentation for OpenStack Barbican API client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-i18n +BuildRequires: python2-prettytable + +%description doc +Documentation for the barbicanclient module + +%prep +%autosetup -n %{name}-%{upstream_version} -S git +# let RPM handle deps +sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py + +rm -rf {test-,}requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +# doc +%{__python2} setup.py build_sphinx -b html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.buildinfo + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python3_version} +ln -s ./barbican-%{python3_version} %{buildroot}%{_bindir}/barbican-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python2_version} +ln -s ./barbican-%{python2_version} %{buildroot}%{_bindir}/barbican-2 +ln -s ./barbican-2 %{buildroot}%{_bindir}/barbican + + +%files -n python2-%{sname} +%license LICENSE +%doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog +%{_bindir}/barbican +%{_bindir}/barbican-2* +%{python2_sitelib}/barbicanclient +%{python2_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog +%{_bindir}/barbican-3* +%{python3_sitelib}/barbicanclient +%{python3_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%changelog +* Tue Nov 27 2018 RDO 4.7.1-1 +- Update to 4.7.1 + +* Wed Aug 08 2018 RDO 4.7.0-1 +- Update to 4.7.0 + diff --git a/openstack/python-ceilometerclient/centos/build_srpm.data b/openstack/python-ceilometerclient/centos/build_srpm.data deleted file mode 100644 index 5e6ea76a..00000000 --- a/openstack/python-ceilometerclient/centos/build_srpm.data +++ /dev/null @@ -1,10 +0,0 @@ -TAR_NAME=python-ceilometerclient -SRC_DIR=$CGCS_BASE/git/python-ceilometerclient - -# Tar everything found in this subdirectory. Define this if source need to be collected into a tarball in SOURCES. -# Tar file name and version are derived from PKG-INFO. Alternatively you may define TAR_NAME ad VERSION - -# A Space separated list of paths to copy to .distro/centos7/rpmbuild/SOURCES. -#COPY_LIST="$CGCS_BASE/downloads/$CLIENT_NAME-$CLIENT_VER.tar.gz $PKG_BASE/$CLIENT_NAME/*" -TIS_BASE_SRCREV=3d4966e6a76c63f6bf4a24d3cb3f86d7a585c1e0 -TIS_PATCH_VER=GITREVCOUNT diff --git a/openstack/python-ceilometerclient/centos/python-ceilometerclient.spec b/openstack/python-ceilometerclient/centos/python-ceilometerclient.spec deleted file mode 100644 index 83f25508..00000000 --- a/openstack/python-ceilometerclient/centos/python-ceilometerclient.spec +++ /dev/null @@ -1,207 +0,0 @@ -%{!?upstream_version: %global upstream_version %{version}%{?milestone}} - -%if 0%{?fedora} -%global with_python3 1 -%endif - -%global sname ceilometerclient -%global sum Python API and CLI for OpenStack Ceilometer - -Name: python-ceilometerclient -Version: 2.9.0 -Release: 1%{?_tis_dist}.%{tis_patch_ver} -Summary: %{sum} - -License: ASL 2.0 -URL: https://github.com/openstack/%{name} -Source0: %{name}-%{upstream_version}.tar.gz - -BuildArch: noarch - -BuildRequires: git -BuildRequires: python-setuptools -BuildRequires: python2-pip -BuildRequires: python2-wheel -BuildRequires: python2-devel -BuildRequires: python-pbr >= 1.6 -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr >= 1.6 -%endif - -%description -This is a client library for Ceilometer built on the Ceilometer API. It -provides a Python API (the ceilometerclient module) and a command-line tool -(ceilometer). - - -%package -n python2-%{sname} -Summary: %{sum} -# from requirements.txt -Requires: python-iso8601 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.17.0 -Requires: python-requests >= 2.8.1 -Requires: python-six >= 1.9.0 -Requires: python-stevedore -Requires: python-pbr -Requires: python-keystoneauth1 >= 2.1.0 -Requires: python-prettytable -%{?python_provide:%python_provide python2-%{sname}} - -%description -n python2-%{sname} -This is a client library for Ceilometer built on the Ceilometer API. It -provides a Python API (the ceilometerclient module) and a command-line tool -(ceilometer). - - -%if 0%{?with_python3} -%package -n python3-%{sname} -Summary: %{sum} -# from requirements.txt -Requires: python3-iso8601 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.17.0 -Requires: python3-requests >= 2.8.1 -Requires: python3-six >= 1.9.0 -Requires: python3-stevedore -Requires: python3-pbr -Requires: python3-keystoneauth1 >= 2.1.0 -Requires: python3-prettytable -%{?python_provide:%python_provide python3-%{sname}} - -# WRS installs to usr/lib and not /usr/lib64 - -%description -n python3-%{sname} -This is a client library for Ceilometer built on the Ceilometer API. It -provides a Python API (the ceilometerclient module) and a command-line tool -(ceilometer). -%endif # with_python3 - - -%package doc -Summary: Documentation for OpenStack Ceilometer API Client - -BuildRequires: python-sphinx -# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476759/ is in u-u -BuildRequires: python-oslo-sphinx -BuildRequires: python-openstackdocstheme - -%description doc -This is a client library for Ceilometer built on the Ceilometer API. It -provides a Python API (the ceilometerclient module) and a command-line tool -(ceilometer). - -This package contains auto-generated documentation. - - -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package - - -%prep -%autosetup -n %{name}-%{upstream_version} -S git - -# Remove bundled egg-info -rm -rf python_%{sname}.egg-info - -# Let RPM handle the requirements -rm -f test-requirements.txt - -%build -export PBR_VERSION=%{version} -%py2_build -%py2_build_wheel -%if 0%{?with_python3} -%py3_build -%endif - -%install -export PBR_VERSION=%{version} -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -%if 0%{?with_python3} -%{__python3} setup.py install -O1 --skip-build --root %{buildroot} -%endif - -%if 0%{?with_python3} -%py3_install -mv %{buildroot}%{_bindir}/ceilometer %{buildroot}%{_bindir}/ceilometer-%{python3_version} -ln -s ./ceilometer-%{python3_version} %{buildroot}%{_bindir}/ceilometer-3 -%endif - -%py2_install -mv %{buildroot}%{_bindir}/ceilometer %{buildroot}%{_bindir}/ceilometer-%{python2_version} -ln -s ./ceilometer-%{python2_version} %{buildroot}%{_bindir}/ceilometer-2 - -ln -s ./ceilometer-2 %{buildroot}%{_bindir}/ceilometer - -# Delete tests -rm -fr %{buildroot}%{python2_sitelib}/%{sname}/tests -%if 0%{?with_python3} -rm -fr %{buildroot}%{python3_sitelib}/%{sname}/tests -%endif - -# Build HTML docs -%{__python2} setup.py build_sphinx -b html - -# Fix hidden-file-or-dir warnings -rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo - -# WRS -install -d %{buildroot}/%{_sysconfdir}/bash_completion.d -install -m 664 tools/ceilometer.bash_completion %{buildroot}/%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion - -# prep SDK package -mkdir -p %{buildroot}/usr/share/remote-clients -tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} - -%files -n python2-%{sname} -%license LICENSE -%doc README.rst -%{python2_sitelib}/%{sname} -%{python2_sitelib}/*.egg-info -%{_bindir}/ceilometer -%{_bindir}/ceilometer-2 -%{_bindir}/ceilometer-%{python2_version} -%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion - -%if 0%{?with_python3} -%files -n python3-%{sname} -%license LICENSE -%doc README.rst -%{python3_sitelib}/%{sname} -%{python3_sitelib}/*.egg-info -%{_bindir}/ceilometer-3 -%{_bindir}/ceilometer-%{python3_version} -%{_sysconfdir}/bash_completion.d/ceilometer.bash_completion -%endif # with_python3 - -%files doc -%license LICENSE -%doc doc/build/html - -%files sdk -/usr/share/remote-clients/%{name}-%{version}.tgz - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/wheels/* - -%changelog -* Fri Aug 11 2017 Alfredo Moralejo 2.9.0-1 -- Update to 2.9.0 - diff --git a/openstack/python-cinderclient/centos/build_srpm.data b/openstack/python-cinderclient/centos/build_srpm.data index 6795d701..7d37ac08 100644 --- a/openstack/python-cinderclient/centos/build_srpm.data +++ b/openstack/python-cinderclient/centos/build_srpm.data @@ -1,10 +1,3 @@ TAR_NAME=python-cinderclient SRC_DIR=$CGCS_BASE/git/python-cinderclient - -# Tar everything found in this subdirectory. Define this if source need to be collected into a tarball in SOURCES. -# Tar file name and version are derived from PKG-INFO. Alternatively you may define TAR_NAME ad VERSION - -# A Space separated list of paths to copy to .distro/centos7/rpmbuild/SOURCES. -#COPY_LIST="$CGCS_BASE/downloads/$CLIENT_NAME-$CLIENT_VER.tar.gz $PKG_BASE/$CLIENT_NAME/*" -TIS_BASE_SRCREV=3640aeab6e11987288a2f149fbeedb1c026045e2 -TIS_PATCH_VER=GITREVCOUNT +TIS_PATCH_VER=0 diff --git a/openstack/python-cinderclient/centos/python-cinderclient.spec b/openstack/python-cinderclient/centos/python-cinderclient.spec index b24968b5..6662a44e 100644 --- a/openstack/python-cinderclient/centos/python-cinderclient.spec +++ b/openstack/python-cinderclient/centos/python-cinderclient.spec @@ -5,8 +5,12 @@ %global with_python3 1 %endif +%global common_desc \ +Client library (cinderclient python module) and command line utility \ +(cinder) for interacting with OpenStack Cinder (Block Storage) API. + Name: python-cinderclient -Version: 3.1.0 +Version: 4.0.1 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python API and CLI for OpenStack Cinder @@ -19,34 +23,37 @@ BuildArch: noarch BuildRequires: git %description -Client library (cinderclient python module) and command line utility -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} %package -n python2-%{sname} Summary: Python API and CLI for OpenStack Cinder %{?python_provide:%python_provide python2-%{sname}} BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python2-pip -BuildRequires: python2-wheel -BuildRequires: python-pbr +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +%if 0%{?fedora} > 0 +BuildRequires: python2-d2to1 +%else BuildRequires: python-d2to1 +%endif -Requires: python-babel -Requires: python-pbr -Requires: python-prettytable -Requires: python-requests -Requires: python-setuptools +Requires: python2-babel +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-requests +Requires: python2-six +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +%if 0%{?fedora} > 0 +Requires: python2-simplejson +%else Requires: python-simplejson -Requires: python-six -Requires: python-keystoneauth1 >= 2.21.0 -Requires: python-oslo-i18n >= 3.9.0 -Requires: python-oslo-utils >= 3.20.0 +%endif %description -n python2-%{sname} -Client library (cinderclient python module) and command line utility -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} %if 0%{?with_python3} @@ -66,13 +73,12 @@ Requires: python3-requests Requires: python3-setuptools Requires: python3-simplejson Requires: python3-six -Requires: python3-keystoneauth1 >= 2.21.0 -Requires: python3-oslo-i18n >= 3.9.0 -Requires: python3-oslo-utils >= 3.20.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 %description -n python3-%{sname} -Client library (cinderclient python module) and command line utility -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} %endif @@ -85,16 +91,10 @@ BuildRequires: python-sphinx BuildRequires: python-openstackdocstheme %description doc -Client library (cinderclient python module) and command line utility -(cinder) for interacting with OpenStack Cinder (Block Storage) API. +%{common_desc} This package contains auto-generated documentation. -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package %prep %autosetup -n %{name}-%{upstream_version} -S git @@ -113,18 +113,13 @@ export PBR_VERSION=%{version} %py3_build %endif -# FIXME (amoralej): following manual edit on conf.py is required for man page -# until https://review.openstack.org/#/c/489123 is merged -sed -i 's/man\/cinder/user\/cinder/' doc/source/conf.py - -%{__python2} setup.py build_sphinx -b html -%{__python2} setup.py build_sphinx -b man +sphinx-build -W -b html doc/source doc/build/html +sphinx-build -W -b man doc/source doc/build/man # Fix hidden-file-or-dir warnings rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo %install -export PBR_VERSION=%{version} %if 0%{?with_python3} %py3_install mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python3_version} @@ -151,6 +146,7 @@ install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1 mkdir -p %{buildroot}/usr/share/remote-clients tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + %files -n python2-%{sname} %doc README.rst %license LICENSE @@ -173,6 +169,12 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude=' %files doc %doc doc/build/html +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + %files sdk /usr/share/remote-clients/%{name}-%{version}.tgz @@ -186,6 +188,6 @@ Contains python wheels for %{name} /wheels/* %changelog -* Fri Aug 11 2017 Alfredo Moralejo 3.1.0-1 -- Update to 3.1.0 +* Thu Aug 09 2018 RDO 4.0.1-1 +- Update to 4.0.1 diff --git a/openstack/python-cinderclient/centos/python-cinderclient.spec.orig b/openstack/python-cinderclient/centos/python-cinderclient.spec.orig new file mode 100644 index 00000000..b9da8b3d --- /dev/null +++ b/openstack/python-cinderclient/centos/python-cinderclient.spec.orig @@ -0,0 +1,166 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname cinderclient +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +Client library (cinderclient python module) and command line utility \ +(cinder) for interacting with OpenStack Cinder (Block Storage) API. + +Name: python-cinderclient +Version: 4.0.1 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Cinder + +License: ASL 2.0 +URL: http://github.com/openstack/python-cinderclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +BuildRequires: git + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Cinder +%{?python_provide:%python_provide python2-%{sname}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +%if 0%{?fedora} > 0 +BuildRequires: python2-d2to1 +%else +BuildRequires: python-d2to1 +%endif + +Requires: python2-babel +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-requests +Requires: python2-six +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +%if 0%{?fedora} > 0 +Requires: python2-simplejson +%else +Requires: python-simplejson +%endif + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Cinder +%{?python_provide:%python_provide python3-%{sname}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-d2to1 + +Requires: python3-babel +Requires: python3-pbr +Requires: python3-prettytable +Requires: python3-requests +Requires: python3-setuptools +Requires: python3-simplejson +Requires: python3-six +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 + +%description -n python3-%{sname} +%{common_desc} +%endif + + +%package doc +Summary: Documentation for OpenStack Cinder API Client +Group: Documentation + +BuildRequires: python-reno +BuildRequires: python-sphinx +BuildRequires: python-openstackdocstheme + +%description doc +%{common_desc} + +This package contains auto-generated documentation. + + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# Remove bundled egg-info +rm -rf python_cinderclient.egg-info + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +sphinx-build -W -b html doc/source doc/build/html +sphinx-build -W -b man doc/source doc/build/man + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python3_version} +ln -s ./cinder-%{python3_version} %{buildroot}%{_bindir}/cinder-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/cinderclient/tests +%endif + +%py2_install +mv %{buildroot}%{_bindir}/cinder %{buildroot}%{_bindir}/cinder-%{python2_version} +ln -s ./cinder-%{python2_version} %{buildroot}%{_bindir}/cinder-2 +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/cinderclient/tests + +ln -s ./cinder-2 %{buildroot}%{_bindir}/cinder + +install -p -D -m 644 tools/cinder.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/cinder.bash_completion + +install -p -D -m 644 doc/build/man/cinder.1 %{buildroot}%{_mandir}/man1/cinder.1 + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/cinder +%{_bindir}/cinder-2* +%{python2_sitelib}/cinderclient +%{python2_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d/cinder.bash_completion +%{_mandir}/man1/cinder.1* + +%if 0%{?with_python3} +%files -n python3-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/cinder-3* +%{python3_sitelib}/cinderclient +%{python3_sitelib}/*.egg-info +%endif + +%files doc +%doc doc/build/html + +%changelog +* Thu Aug 09 2018 RDO 4.0.1-1 +- Update to 4.0.1 + diff --git a/openstack/python-glanceclient/centos/build_srpm.data b/openstack/python-glanceclient/centos/build_srpm.data index fa24455a..de9280c0 100644 --- a/openstack/python-glanceclient/centos/build_srpm.data +++ b/openstack/python-glanceclient/centos/build_srpm.data @@ -1,5 +1,3 @@ TAR_NAME=python-glanceclient SRC_DIR="$CGCS_BASE/git/python-glanceclient" -COPY_LIST="$FILES_BASE/*" -TIS_BASE_SRCREV=13b25ff1fed908cfe7b4e719a97efd7121e3be96 -TIS_PATCH_VER=GITREVCOUNT +TIS_PATCH_VER=0 diff --git a/openstack/python-glanceclient/centos/files/image-backup.sh b/openstack/python-glanceclient/centos/files/image-backup.sh deleted file mode 100644 index ba77a0de..00000000 --- a/openstack/python-glanceclient/centos/files/image-backup.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2016 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -backup_dir="/opt/backups" -tmp_dir="${backup_dir}/image_temp" - -function usage { - cat <<"EOF" -Helper tool for backing up Glance images -Usage: -image-backup export - export the image with into backup file /opt/backups/image_.tgz -image-backup import image_.tgz - import the image from the backup source file at /opt/backups/image_.tgz -into the corresponding image. - -Temporary files are stored in /opt/backups/image_temp - -Please consult the System Backups section of the Administration Guide. -EOF -} - -function create_tmp { - if [ ! -d ${backup_dir} ]; then - echo "Error: backup directory ${backup_dir} does not exist" - exit 1 - fi - # Create temporary directory - if [ ! -d ${tmp_dir} ]; then - mkdir ${tmp_dir} - fi - -} - -function remove_tmp { - # Remove temporary files and directory if not empty - local uuid=$1 - rm -f ${tmp_dir}/${uuid}* - rmdir --ignore-fail-on-non-empty ${tmp_dir} &>/dev/null -} - -function export_file_from_rbd_image { - local file=$1 - rbd export -p images ${file} ${tmp_dir}/${file} - if [ $? -ne 0 ]; then - echo "Error: Failed to export image ${file} from Ceph images pool, please check status of storage cluster" - remove_tmp; exit 1 - fi -} - -function export_image { - local uuid=$1 - - # Check if the corresponding image is present in the RBD pool - rbd -p images ls | grep -q -e "^${uuid}$" - if [ $? -ne 0 ]; then - echo "Error: Corresponding file for image with id: ${uuid} was not found in the RBD images pool" - remove_tmp; exit 1 - fi - - # Export original image - export_file_from_rbd_image ${uuid} - - # Export raw cache if present - rbd -p images ls | grep -q ${uuid}_raw - if [ $? -eq 0 ]; then - export_file_from_rbd_image ${uuid}_raw - raw="${uuid}_raw" - fi - - echo -n "Creating backup archive..." - archive="${backup_dir}/image_${uuid}.tgz" - tar czf ${archive} -C ${tmp_dir} ${uuid} ${raw} - if [ $? -ne 0 ]; then - echo "Error: Failed to create archive ${archive}" - remove_tmp; exit 1 - else - echo "done" - fi - - echo "Backup archive ${archive} created" -} - -function import_file_to_rbd_image { - local file=$1 - local snap="images/${file}@snap" - rbd import --image-format 2 ${tmp_dir}/${file} images/${file} - if [ $? -ne 0 ]; then - echo "Error: Failed to import image ${file} into Ceph images pool, please check status of storage cluster" - remove_tmp; exit 1 - fi - rbd snap create ${snap} 1>/dev/null - if [ $? -ne 0 ]; then - echo "Error: Failed to create snapshot ${snap}, please check status of storage cluster" - remove_tmp; exit 1 - fi - rbd snap protect ${snap} 1>/dev/null - if [ $? -ne 0 ]; then - echo "Error: Failed to protect snapshot ${snap}, please check status of storage cluster" - remove_tmp; exit 1 - fi -} - -function import_image { - local uuid=$1 - - # Storage cluster must be healthy before starting the import - if [ ! "$(ceph health)" = "HEALTH_OK" ]; then - echo "Error: The storage cluster health must be HEALTH_OK before proceding" - remove_tmp; exit 1 - fi - - # Check if the corresponding image is already present in the RBD pool - rbd -p images ls | grep -q -e "^${uuid}$" - if [ $? -eq 0 ]; then - echo "Error: Image with id: ${uuid} is already imported" - remove_tmp; exit 1 - fi - - # Import original image - import_file_to_rbd_image ${uuid} - - # Import raw cache - if [ -f "${tmp_dir}/${uuid}_raw" ]; then - import_file_to_rbd_image ${uuid}_raw - fi -} - -if [ $EUID -ne 0 ]; then - echo "This script must be executed as root" - exit 1 -fi - -if [ $# -ne 2 ]; then - usage - exit 0 -fi - -source /etc/nova/openrc - -# Check if glance is using ceph as RBD -cat /etc/glance/glance-api.conf | grep -q -e "^stores.*=.*rbd" -if [ $? -ne 0 ]; then - echo "Error: Glance is not configured to use the ceph backend." - echo "This command should be used only on setups with configured Ceph storage." - exit 1 -fi - -if [ "$1" = "export" ]; then - # Check that glance image is present in glance - glance image-list | tail -n +3 | awk '{print $2}' | grep -q $2 - if [ $? -ne 0 ]; then - echo "Error: Glance image with id: $2 not found. Please try with an existing image id." - remove_tmp; exit 1 - fi - - # Only allow backup of images that use rbd as backend. - glance image-show $2 | grep 'direct_url' | awk '{print $4}' | grep -q '^rbd://' - if [ $? -ne 0 ]; then - echo "Image with id: $2 is not stored in Ceph RBD. Backup using image-backup tool is not needed." - echo "Please consult the Software Management Manual for more details." - remove_tmp; exit 1 - fi - - create_tmp - export_image $2 - remove_tmp - -elif [ "$1" = "import" ]; then - # Check that the input file format is correct - if [[ ! $2 =~ ^image_.*\.tgz$ ]]; then - echo "Error: Source file name must conform to image_.tgz format" - exit 1 - fi - - # Check that the source file exists - if [ ! -f ${backup_dir}/$2 ]; then - echo "Error: File $2 does not exists in ${backup_dir}" - exit 1 - fi - - # Get glance uuid from filename - uuid=$(echo $2 | sed "s/^image_\(.*\)\.tgz/\1/g") - - # Check that glance has this image in the database - glance image-list | grep -q $uuid - if [ $? -ne 0 ]; then - echo "Error: Glance image with id: ${uuid} not found. Please try with an existing image id." - exit 1 - fi - - create_tmp - - # Extract the files that need to be imported into the temp directory - echo -n "Extracting files..." - tar xfz ${backup_dir}/$2 -C ${tmp_dir} 1>/dev/null - if [ $? -ne 0 ]; then - echo "Error: Failed to extract archive ${backup_dir}/$2 into ${tmp_dir}." - remove_tmp; exit 1 - fi - echo "done" - - # Importing images into RBD - import_image $uuid - remove_tmp -else - usage -fi diff --git a/openstack/python-glanceclient/centos/python-glanceclient.spec b/openstack/python-glanceclient/centos/python-glanceclient.spec index 1b0d5638..dc3013b7 100644 --- a/openstack/python-glanceclient/centos/python-glanceclient.spec +++ b/openstack/python-glanceclient/centos/python-glanceclient.spec @@ -1,31 +1,34 @@ %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global sname glanceclient +%global with_doc 0 %if 0%{?fedora} %global with_python3 1 %endif +%global common_desc \ +This is a client for the OpenStack Glance API. There's a Python API (the \ +glanceclient module), and a command-line script (glance). Each implements \ +100% of the OpenStack Glance API. + Name: python-glanceclient Epoch: 1 -Version: 2.8.0 +Version: 2.13.1 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python API and CLI for OpenStack Glance License: ASL 2.0 URL: https://launchpad.net/python-glanceclient Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz -#WRS -Source1: image-backup.sh BuildArch: noarch BuildRequires: git +BuildRequires: openstack-macros %description -This is a client for the OpenStack Glance API. There's a Python API (the -glanceclient module), and a command-line script (glance). Each implements -100% of the OpenStack Glance API. +%{common_desc} %package -n python2-%{sname} Summary: Python API and CLI for OpenStack Glance @@ -34,24 +37,27 @@ Summary: Python API and CLI for OpenStack Glance BuildRequires: python2-devel BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-setuptools -BuildRequires: python-pbr +BuildRequires: python2-setuptools +BuildRequires: python2-pbr -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: python-pbr -Requires: python-prettytable -Requires: pyOpenSSL >= 0.14 -Requires: python-requests -Requires: python-six >= 1.9.0 +Requires: python2-keystoneauth1 >= 3.6.2 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-pyOpenSSL >= 17.1.0 +Requires: python2-requests +Requires: python2-six >= 1.10.0 +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: python2-warlock +Requires: python2-wrapt +%else Requires: python-warlock Requires: python-wrapt +%endif %description -n python2-%{sname} -This is a client for the OpenStack Glance API. There's a Python API (the -glanceclient module), and a command-line script (glance). Each implements -100% of the OpenStack Glance API. +%{common_desc} %if 0%{?with_python3} %package -n python3-%{sname} @@ -62,52 +68,48 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr -Requires: python3-keystoneauth1 >= 3.1.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-utils >= 3.20.0 +Requires: python3-keystoneauth1 >= 3.6.2 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 Requires: python3-pbr Requires: python3-prettytable -Requires: python3-pyOpenSSL >= 0.14 +Requires: python3-pyOpenSSL >= 17.1.0 Requires: python3-requests -Requires: python3-six >= 1.9.0 +Requires: python3-six >= 1.10.0 Requires: python3-warlock Requires: python3-wrapt %description -n python3-%{sname} -This is a client for the OpenStack Glance API. There's a Python API (the -glanceclient module), and a command-line script (glance). Each implements -100% of the OpenStack Glance API. +%{common_desc} %endif +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Glance API Client -BuildRequires: python-sphinx -BuildRequires: python-openstackdocstheme -BuildRequires: python-keystoneauth1 -BuildRequires: python-oslo-utils -BuildRequires: python-prettytable +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-utils +BuildRequires: python2-prettytable +BuildRequires: python2-pyOpenSSL >= 17.1.0 +BuildRequires: python2-sphinxcontrib-apidoc +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: python2-warlock +%else BuildRequires: python-warlock -BuildRequires: pyOpenSSL >= 0.14 +%endif %description doc -This is a client for the OpenStack Glance API. There's a Python API (the -glanceclient module), and a command-line script (glance). Each implements -100% of the OpenStack Glance API. +%{common_desc} This package contains auto-generated documentation. - -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package - +%endif %prep %autosetup -n %{name}-%{upstream_version} -S git -rm -rf test-requirements.txt +%py_req_cleanup %build export PBR_VERSION=%{version} @@ -118,7 +120,6 @@ export PBR_VERSION=%{version} %endif %install -export PBR_VERSION=%{version} %if 0%{?with_python3} %py3_install mv %{buildroot}%{_bindir}/glance %{buildroot}%{_bindir}/glance-%{python3_version} @@ -127,6 +128,7 @@ ln -s ./glance-%{python3_version} %{buildroot}%{_bindir}/glance-3 rm -fr %{buildroot}%{python3_sitelib}/glanceclient/tests %endif + %py2_install mv %{buildroot}%{_bindir}/glance %{buildroot}%{_bindir}/glance-%{python2_version} ln -s ./glance-%{python2_version} %{buildroot}%{_bindir}/glance-2 @@ -136,7 +138,6 @@ ln -s ./glance-2 %{buildroot}%{_bindir}/glance mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 644 tools/glance.bash_completion \ %{buildroot}%{_sysconfdir}/bash_completion.d/glance -install -p -D -m 500 %{SOURCE1} %{buildroot}/sbin/image-backup mkdir -p $RPM_BUILD_ROOT/wheels install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ @@ -144,13 +145,15 @@ install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ # Delete tests rm -fr %{buildroot}%{python2_sitelib}/glanceclient/tests -export PYTHONPATH="$( pwd ):$PYTHONPATH" -sphinx-build -b html doc/source html - +%if 0%{?with_doc} +# generate html docs +sphinx-build -b html doc/source doc/build/html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} # generate man page -sphinx-build -b man doc/source man -install -p -D -m 644 man/glance.1 %{buildroot}%{_mandir}/man1/glance.1 - +sphinx-build -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/glance.1 %{buildroot}%{_mandir}/man1/glance.1 +%endif # prep SDK package mkdir -p %{buildroot}/usr/share/remote-clients/%{name} tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} @@ -162,8 +165,9 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --e %{python2_sitelib}/glanceclient %{python2_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} %{_mandir}/man1/glance.1.gz -"/sbin/image-backup" +%endif %{_bindir}/glance %{_bindir}/glance-2 %{_bindir}/glance-%{python2_version} @@ -180,9 +184,17 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --e %{_bindir}/glance-%{python3_version} %endif +%if 0%{?with_doc} %files doc -%doc html +%doc doc/build/html %license LICENSE +%endif + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package %files sdk /usr/share/remote-clients/%{name}/%{name}-%{version}.tgz @@ -197,6 +209,12 @@ Contains python wheels for %{name} /wheels/* %changelog -* Fri Aug 11 2017 Alfredo Moralejo 1:2.8.0-1 -- Update to 2.8.0 +* Wed Dec 19 2018 RDO 1:2.13.1-1 +- Update to 2.13.1 + +* Mon Nov 05 2018 RDO 1:2.13.0-1 +- Update to 2.13.0 + +* Wed Aug 08 2018 RDO 1:2.12.1-1 +- Update to 2.12.1 diff --git a/openstack/python-glanceclient/centos/python-glanceclient.spec.orig b/openstack/python-glanceclient/centos/python-glanceclient.spec.orig new file mode 100644 index 00000000..d81856b8 --- /dev/null +++ b/openstack/python-glanceclient/centos/python-glanceclient.spec.orig @@ -0,0 +1,190 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname glanceclient +%global with_doc 1 + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the OpenStack Glance API. There's a Python API (the \ +glanceclient module), and a command-line script (glance). Each implements \ +100% of the OpenStack Glance API. + +Name: python-glanceclient +Epoch: 1 +Version: 2.13.1 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Glance + +License: ASL 2.0 +URL: https://launchpad.net/python-glanceclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Glance +%{?python_provide:%python_provide python2-glanceclient} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr + +Requires: python2-keystoneauth1 >= 3.6.2 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-pyOpenSSL >= 17.1.0 +Requires: python2-requests +Requires: python2-six >= 1.10.0 +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: python2-warlock +Requires: python2-wrapt +%else +Requires: python-warlock +Requires: python-wrapt +%endif + +%description -n python2-%{sname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Glance +%{?python_provide:%python_provide python3-glanceclient} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + +Requires: python3-keystoneauth1 >= 3.6.2 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-pbr +Requires: python3-prettytable +Requires: python3-pyOpenSSL >= 17.1.0 +Requires: python3-requests +Requires: python3-six >= 1.10.0 +Requires: python3-warlock +Requires: python3-wrapt + +%description -n python3-%{sname} +%{common_desc} +%endif + +%if 0%{?with_doc} +%package doc +Summary: Documentation for OpenStack Glance API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-utils +BuildRequires: python2-prettytable +BuildRequires: python2-pyOpenSSL >= 17.1.0 +BuildRequires: python2-sphinxcontrib-apidoc +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: python2-warlock +%else +BuildRequires: python-warlock +%endif + +%description doc +%{common_desc} + +This package contains auto-generated documentation. +%endif + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +%py_req_cleanup + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/glance %{buildroot}%{_bindir}/glance-%{python3_version} +ln -s ./glance-%{python3_version} %{buildroot}%{_bindir}/glance-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/glanceclient/tests +%endif + +%py2_install +mv %{buildroot}%{_bindir}/glance %{buildroot}%{_bindir}/glance-%{python2_version} +ln -s ./glance-%{python2_version} %{buildroot}%{_bindir}/glance-2 + +ln -s ./glance-2 %{buildroot}%{_bindir}/glance + +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 tools/glance.bash_completion \ + %{buildroot}%{_sysconfdir}/bash_completion.d/glance + +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/glanceclient/tests + +%if 0%{?with_doc} +# generate html docs +sphinx-build -b html doc/source doc/build/html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} +# generate man page +sphinx-build -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/glance.1 %{buildroot}%{_mandir}/man1/glance.1 +%endif + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/glanceclient +%{python2_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} +%{_mandir}/man1/glance.1.gz +%endif +%{_bindir}/glance +%{_bindir}/glance-2 +%{_bindir}/glance-%{python2_version} + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/glance.1.gz +%{_bindir}/glance-3 +%{_bindir}/glance-%{python3_version} +%endif + +%if 0%{?with_doc} +%files doc +%doc doc/build/html +%license LICENSE +%endif + +%changelog +* Wed Dec 19 2018 RDO 1:2.13.1-1 +- Update to 2.13.1 + +* Mon Nov 05 2018 RDO 1:2.13.0-1 +- Update to 2.13.0 + +* Wed Aug 08 2018 RDO 1:2.12.1-1 +- Update to 2.12.1 + diff --git a/openstack/python-gnocchiclient/centos/build_srpm.data b/openstack/python-gnocchiclient/centos/build_srpm.data index 83588ecd..2ac72bf0 100644 --- a/openstack/python-gnocchiclient/centos/build_srpm.data +++ b/openstack/python-gnocchiclient/centos/build_srpm.data @@ -1,5 +1,3 @@ -VERSION=7.0.1 TAR_NAME=gnocchiclient -COPY_LIST="$CGCS_BASE/downloads/$TAR_NAME-$VERSION.tar.gz" - -TIS_PATCH_VER=1 +SRC_DIR=$CGCS_BASE/git/python-gnocchiclient +TIS_PATCH_VER=0 diff --git a/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec b/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec index 3d90c043..ab0095e3 100644 --- a/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec +++ b/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec @@ -14,14 +14,17 @@ This is a client library for Gnocchi built on the Gnocchi API. It \ provides a Python API (the gnocchiclient module) and a command-line tool. Name: python-gnocchiclient -Version: 7.0.1 +Version: 7.0.4 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python API and CLI for OpenStack Gnocchi License: ASL 2.0 URL: https://github.com/openstack/%{name} Source0: https://pypi.io/packages/source/g/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz - +# FIXME(jpena): remove this patch once a version > 7.0.1 is released +%if "%{version}" == "7.0.1" +Patch0001: 0001-Avoid-using-openstack-doc-tools.patch +%endif BuildArch: noarch @@ -37,15 +40,15 @@ BuildRequires: python2-devel BuildRequires: python2-pbr BuildRequires: python2-tools -Requires: python-cliff >= 1.16.0 -Requires: python2-osc-lib >= 1.7.0 +Requires: python2-cliff >= 2.10 +Requires: python2-osc-lib >= 1.8.0 Requires: python2-keystoneauth1 >= 2.0.0 Requires: python2-six >= 1.10.0 Requires: python2-futurist Requires: python2-ujson Requires: python2-pbr Requires: python2-iso8601 -Requires: python-dateutil +Requires: python2-dateutil Requires: python2-debtcollector %if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-monotonic @@ -62,9 +65,7 @@ Summary: Documentation for OpenStack Gnocchi API Client Group: Documentation BuildRequires: python2-sphinx -BuildRequires: python2-oslo-sphinx -BuildRequires: python2-openstack-doc-tools -BuildRequires: python-cliff +BuildRequires: python2-cliff >= 2.10 BuildRequires: python2-keystoneauth1 BuildRequires: python2-six BuildRequires: python2-futurist @@ -74,7 +75,7 @@ BuildRequires: python2-sphinx_rtd_theme BuildRequires: python2-babel # Runtime requirements needed during documentation build BuildRequires: python2-osc-lib -BuildRequires: python-dateutil +BuildRequires: python2-dateutil %description doc %{common_desc} @@ -99,8 +100,8 @@ BuildRequires: python3-pbr BuildRequires: python3-setuptools BuildRequires: python3-tools -Requires: python3-cliff >= 1.16.0 -Requires: python3-osc-lib >= 1.7.0 +Requires: python3-cliff >= 2.10 +Requires: python3-osc-lib >= 1.8.0 Requires: python3-keystoneauth1 >= 2.0.0 Requires: python3-six >= 1.10.0 Requires: python3-futurist @@ -126,14 +127,9 @@ Requires: python3-%{pypi_name} = %{version}-%{release} %description %{common_desc} -%package sdk -Summary: SDK files for %{pypi_name} - -%description sdk -Contains SDK files for %{pypi_name} package %prep -%autosetup -n %{pypi_name}-%{upstream_version} -S git +%autosetup -p1 -n %{pypi_name}-%{upstream_version} %if 0%{?with_python3} rm -rf %{py3dir} @@ -145,7 +141,7 @@ cp -a . %{py3dir} rm -rf gnocchiclient.egg-info # Let RPM handle the requirements -rm -f test-requirements.txt +rm -f {,test-}requirements.txt %build export PBR_VERSION=%{version} @@ -168,9 +164,11 @@ popd %endif %{__python2} setup.py install --skip-build --root %{buildroot} + mkdir -p $RPM_BUILD_ROOT/wheels install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + # rename binaries, make compat symlinks install -m 755 -d %{buildroot}/%{_bindir} pushd %{buildroot}%{_bindir} @@ -185,7 +183,6 @@ done popd # Some env variables required to successfully build our doc -export PATH=$PATH:%{buildroot}%{_bindir} export PYTHONPATH=. export LANG=en_US.utf8 python setup.py build_sphinx -b html @@ -197,6 +194,7 @@ rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo mkdir -p %{buildroot}/usr/share/remote-clients tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{pypi_name}-%{version} + %files -n python2-%{pypi_name} %doc README.rst %license LICENSE @@ -230,6 +228,12 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --excl %files -n python-%{pypi_name}-doc %doc doc/build/html +%package sdk +Summary: SDK files for %{pypi_name} + +%description sdk +Contains SDK files for %{pypi_name} package + %files sdk /usr/share/remote-clients/%{pypi_name}-%{version}.tgz @@ -242,6 +246,8 @@ Contains python wheels for %{name} %files wheels /wheels/* + %changelog -* Tue Feb 13 2018 RDO 7.0.1-1 -- Update to 7.0.1 +* Thu Aug 09 2018 RDO 7.0.4-1 +- Update to 7.0.4 + diff --git a/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec.orig b/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec.orig new file mode 100644 index 00000000..5ca48cbc --- /dev/null +++ b/openstack/python-gnocchiclient/centos/python-gnocchiclient.spec.orig @@ -0,0 +1,220 @@ +%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} +%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} + +%global pypi_name gnocchiclient + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +%global common_desc \ +This is a client library for Gnocchi built on the Gnocchi API. It \ +provides a Python API (the gnocchiclient module) and a command-line tool. + +Name: python-gnocchiclient +Version: 7.0.4 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Gnocchi + +License: ASL 2.0 +URL: https://github.com/openstack/%{name} +Source0: https://pypi.io/packages/source/g/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz +# FIXME(jpena): remove this patch once a version > 7.0.1 is released +%if "%{version}" == "7.0.1" +Patch0001: 0001-Avoid-using-openstack-doc-tools.patch +%endif +BuildArch: noarch + + +%package -n python2-%{pypi_name} +Summary: Python API and CLI for OpenStack Gnocchi +%{?python_provide:%python_provide python2-gnocchiclient} + + +BuildRequires: python2-setuptools +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-tools + +Requires: python2-cliff >= 2.10 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-keystoneauth1 >= 2.0.0 +Requires: python2-six >= 1.10.0 +Requires: python2-futurist +Requires: python2-ujson +Requires: python2-pbr +Requires: python2-iso8601 +Requires: python2-dateutil +Requires: python2-debtcollector +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: python2-monotonic +%else +Requires: python-monotonic +%endif + +%description -n python2-%{pypi_name} +%{common_desc} + + +%package -n python-%{pypi_name}-doc +Summary: Documentation for OpenStack Gnocchi API Client +Group: Documentation + +BuildRequires: python2-sphinx +BuildRequires: python2-cliff >= 2.10 +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-six +BuildRequires: python2-futurist +BuildRequires: python2-ujson +BuildRequires: python2-sphinx_rtd_theme +# test +BuildRequires: python2-babel +# Runtime requirements needed during documentation build +BuildRequires: python2-osc-lib +BuildRequires: python2-dateutil + +%description doc +%{common_desc} + +This package contains auto-generated documentation. + +%package -n python2-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Gnocchi Tests +Requires: python2-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Python API and CLI for OpenStack Gnocchi + +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools +BuildRequires: python3-tools + +Requires: python3-cliff >= 2.10 +Requires: python3-osc-lib >= 1.8.0 +Requires: python3-keystoneauth1 >= 2.0.0 +Requires: python3-six >= 1.10.0 +Requires: python3-futurist +Requires: python3-ujson +Requires: python3-pbr +Requires: python3-monotonic +Requires: python3-iso8601 +Requires: python3-dateutil +Requires: python3-debtcollector + +%description -n python3-%{pypi_name} +%{common_desc} + +%package -n python3-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Gnocchi Tests +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +%{common_desc} + +%endif + +%description +%{common_desc} + + +%prep +%autosetup -p1 -n %{pypi_name}-%{upstream_version} + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +2to3 --write --nobackups %{py3dir} +%endif + +# Remove bundled egg-info +rm -rf gnocchiclient.egg-info + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py build +popd +%endif + + +%install +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}%{_bindir}/gnocchi %{buildroot}%{_bindir}/python3-gnocchi +popd +%endif + +%{__python2} setup.py install --skip-build --root %{buildroot} + +# rename binaries, make compat symlinks +install -m 755 -d %{buildroot}/%{_bindir} +pushd %{buildroot}%{_bindir} +for i in gnocchi-{2,%{?python2_shortver}}; do + ln -s gnocchi $i +done +%if 0%{?with_python3} +for i in gnocchi-{3,%{?python3_shortver}}; do + ln -s python3-gnocchi $i +done +%endif +popd + +# Some env variables required to successfully build our doc +export PYTHONPATH=. +export LANG=en_US.utf8 +python setup.py build_sphinx -b html + +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/gnocchi +%{_bindir}/gnocchi-2* +%{python2_sitelib}/gnocchiclient +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/gnocchiclient/tests + +%files -n python2-%{pypi_name}-tests +%license LICENSE +%{python2_sitelib}/gnocchiclient/tests + + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/python3-gnocchi +%{_bindir}/gnocchi-3* +%{python3_sitelib}/gnocchiclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/gnocchiclient/tests + +%files -n python3-%{pypi_name}-tests +%license LICENSE +%{python3_sitelib}/gnocchiclient/tests + +%endif + +%files -n python-%{pypi_name}-doc +%doc doc/build/html + +%changelog +* Thu Aug 09 2018 RDO 7.0.4-1 +- Update to 7.0.4 + diff --git a/openstack/python-heat/openstack-heat/centos/openstack-heat.spec b/openstack/python-heat/openstack-heat/centos/openstack-heat.spec index 48c42007..05619f3e 100644 --- a/openstack/python-heat/openstack-heat/centos/openstack-heat.spec +++ b/openstack/python-heat/openstack-heat/centos/openstack-heat.spec @@ -87,7 +87,6 @@ BuildRequires: python-saharaclient BuildRequires: python-neutronclient BuildRequires: python-swiftclient BuildRequires: python-heatclient -BuildRequires: python-ceilometerclient BuildRequires: python-glanceclient BuildRequires: python-troveclient BuildRequires: python-aodhclient @@ -277,7 +276,6 @@ Requires: python-oslo-service Requires: python-oslo-log Requires: python-oslo-versionedobjects -Requires: python-ceilometerclient Requires: python-cinderclient Requires: python-glanceclient Requires: python-heatclient diff --git a/openstack/python-heatclient/centos/build_srpm.data b/openstack/python-heatclient/centos/build_srpm.data index d3f64f33..a78058ee 100644 --- a/openstack/python-heatclient/centos/build_srpm.data +++ b/openstack/python-heatclient/centos/build_srpm.data @@ -1 +1,4 @@ -TIS_PATCH_VER=3 +TAR_NAME=python-heatclient +SRC_DIR=$CGCS_BASE/git/python-heatclient +TIS_PATCH_VER=0 + diff --git a/openstack/python-heatclient/centos/meta_patches/0001-Update-package-versioning-format-for-TiS-format.patch b/openstack/python-heatclient/centos/meta_patches/0001-Update-package-versioning-format-for-TiS-format.patch deleted file mode 100644 index ea37d1c6..00000000 --- a/openstack/python-heatclient/centos/meta_patches/0001-Update-package-versioning-format-for-TiS-format.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 001aa3b51766fb3b2cbb0c9a0c715650ef394f8c Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Mon, 30 Jan 2017 12:24:46 -0500 -Subject: [PATCH 1/2] Update package versioning format for Titanium Cloud format - ---- - SPECS/python-heatclient.spec | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/SPECS/python-heatclient.spec b/SPECS/python-heatclient.spec -index 73a1c6f..7d6d32f 100644 ---- a/SPECS/python-heatclient.spec -+++ b/SPECS/python-heatclient.spec -@@ -8,7 +8,7 @@ - - Name: python-heatclient - Version: 1.11.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Python API and CLI for OpenStack Heat - - License: ASL 2.0 --- -1.8.3.1 - diff --git a/openstack/python-heatclient/centos/meta_patches/0002-Packages-sdk-for-remote-clients.patch b/openstack/python-heatclient/centos/meta_patches/0002-Packages-sdk-for-remote-clients.patch deleted file mode 100644 index 80bdb619..00000000 --- a/openstack/python-heatclient/centos/meta_patches/0002-Packages-sdk-for-remote-clients.patch +++ /dev/null @@ -1,51 +0,0 @@ -From e3f1154184f24103942c98fa9373763df49703c7 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Mon, 2 Oct 2017 14:32:49 -0400 -Subject: WRS: 0002-Packages-sdk-for-remote-clients.patch - ---- - SPECS/python-heatclient.spec | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/SPECS/python-heatclient.spec b/SPECS/python-heatclient.spec -index c5ff419..1f44763 100644 ---- a/SPECS/python-heatclient.spec -+++ b/SPECS/python-heatclient.spec -@@ -92,6 +92,13 @@ the OpenStack Heat API. - - This package contains auto-generated documentation. - -+%package sdk -+Summary: SDK files for %{name} -+ -+%description sdk -+Contains SDK files for %{name} package -+ -+ - %prep - %autosetup -n %{name}-%{upstream_version} -S git - -@@ -128,6 +135,10 @@ install -pm 644 tools/heat.bash_completion \ - # Delete tests - rm -fr %{buildroot}%{python2_sitelib}/heatclient/tests - -+# prep SDK package -+mkdir -p %{buildroot}/usr/share/remote-clients/%{name} -+tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} -+ - - %{__python2} setup.py build_sphinx -b html - # Fix hidden-file-or-dir warnings -@@ -164,6 +175,9 @@ install -p -D -m 644 doc/build/man/heat.1 %{buildroot}%{_mandir}/man1/heat.1 - %doc doc/build/html - %license LICENSE - -+%files sdk -+/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz -+ - %changelog - * Mon Aug 14 2017 Alfredo Moralejo 1.11.0-1 - - Update to 1.11.0 --- -2.7.4 - diff --git a/openstack/python-heatclient/centos/meta_patches/0003-Apply-timezone-support-patch.patch b/openstack/python-heatclient/centos/meta_patches/0003-Apply-timezone-support-patch.patch deleted file mode 100644 index 1c73736e..00000000 --- a/openstack/python-heatclient/centos/meta_patches/0003-Apply-timezone-support-patch.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 2d0e1e8effaf3c83e137af5a79eb62f3e312bd94 Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 26 Oct 2017 08:56:39 -0500 -Subject: [PATCH] WRS: 0003-Apply-timezone-support-patch.patch - ---- - SPECS/python-heatclient.spec | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/SPECS/python-heatclient.spec b/SPECS/python-heatclient.spec -index 1f44763..12ce333 100644 ---- a/SPECS/python-heatclient.spec -+++ b/SPECS/python-heatclient.spec -@@ -15,6 +15,12 @@ License: ASL 2.0 - URL: https://launchpad.net/python-heatclientclient - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - -+# WRS. -+Patch0001: 0001-timezone-support-for-heatclient.patch -+ -+# BuildArch needs to be located below patches in the spec file -+ -+ - BuildArch: noarch - - %description -@@ -101,6 +107,7 @@ Contains SDK files for %{name} package - - %prep - %autosetup -n %{name}-%{upstream_version} -S git -+# autosetup applies all patches automatically - - rm -rf {test-,}requirements.txt tools/{pip,test}-requires - --- -1.8.3.1 - diff --git a/openstack/python-heatclient/centos/meta_patches/PATCH_ORDER b/openstack/python-heatclient/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 87f461e1..00000000 --- a/openstack/python-heatclient/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,3 +0,0 @@ -0001-Update-package-versioning-format-for-TiS-format.patch -0002-Packages-sdk-for-remote-clients.patch -0003-Apply-timezone-support-patch.patch diff --git a/openstack/python-heatclient/centos/patches/0001-timezone-support-for-heatclient.patch b/openstack/python-heatclient/centos/patches/0001-timezone-support-for-heatclient.patch deleted file mode 100644 index aa951422..00000000 --- a/openstack/python-heatclient/centos/patches/0001-timezone-support-for-heatclient.patch +++ /dev/null @@ -1,224 +0,0 @@ -From d144d6cfe42d8af42106f709114fd707afcfaede Mon Sep 17 00:00:00 2001 -From: Litao Gao -Date: Fri, 24 Mar 2017 04:34:54 -0400 -Subject: [PATCH 1/1] timezone support for heatclient - ---- - heatclient/common/utils.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++ - heatclient/v1/shell.py | 18 +++++++++++++++++ - 2 files changed, 66 insertions(+) - -diff --git a/heatclient/common/utils.py b/heatclient/common/utils.py -index f2b20f1..9f2767f 100644 ---- a/heatclient/common/utils.py -+++ b/heatclient/common/utils.py -@@ -18,6 +18,14 @@ import logging - import os - import textwrap - import uuid -+import sys -+import re -+ -+from functools import wraps -+from cStringIO import StringIO -+from datetime import datetime -+import dateutil -+from dateutil import parser - - from oslo_serialization import jsonutils - from oslo_utils import encodeutils -@@ -371,3 +379,43 @@ def get_response_body(resp): - else: - body = None - return body -+ -+ -+def parse_date(string_data): -+ """Parses a date-like input string into a timezone aware Python -+ datetime. -+ """ -+ pattern = r'(\d{4}-\d{2}-\d{2}[T ])?\d{2}:\d{2}:\d{2}(\.\d{6})?Z?' -+ -+ def convert_date(matchobj): -+ formats = ["%Y-%m-%dT%H:%M:%S.%f", "%Y-%m-%d %H:%M:%S.%f", -+ "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d %H:%M:%S", -+ "%Y-%m-%dT%H:%M:%SZ", "%H:%M:%S"] -+ datestring = matchobj.group(0) -+ if datestring: -+ for format in formats: -+ try: -+ datetime.strptime(datestring, format) -+ datestring += "+0000" -+ parsed = parser.parse(datestring) -+ converted = parsed.astimezone(dateutil.tz.tzlocal()) -+ return datetime.strftime(converted, format) -+ except Exception: -+ pass -+ return datestring -+ -+ return re.sub(pattern, convert_date, str(string_data)) -+ -+ -+def timestamp_converter(display): -+ """ -+ Decorator that parse the timestamp and convert according timezone -+ """ -+ @wraps(display) -+ def new_f(*args, **kwargs): -+ sys.stdout = mystdout = StringIO() -+ display(*args, **kwargs) -+ sys.stdout = sys.__stdout__ -+ content = mystdout.getvalue() -+ print parse_date(content) -+ return new_f -diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py -index ac4ecb9..d8c8324 100644 ---- a/heatclient/v1/shell.py -+++ b/heatclient/v1/shell.py -@@ -45,6 +45,7 @@ def show_deprecated(deprecated, recommended): - ) - - -+@utils.timestamp_converter - @utils.arg('-f', '--template-file', metavar='', - help=_('Path to the template.')) - @utils.arg('-e', '--environment-file', metavar='', -@@ -414,6 +415,7 @@ def do_action_check(hc, args): - do_stack_list(hc) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to describe.')) - @utils.arg('--no-resolve-outputs', action="store_true", -@@ -592,6 +594,7 @@ def do_stack_cancel_update(hc, args): - do_stack_list(hc) - - -+@utils.timestamp_converter - @utils.arg('-s', '--show-deleted', default=False, action="store_true", - help=_('Include soft-deleted stacks in the stack listing.')) - @utils.arg('-n', '--show-nested', default=False, action="store_true", -@@ -695,6 +698,7 @@ def do_stack_list(hc, args=None): - utils.print_list(stacks, fields, sortby_index=sortby_index) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to query.')) - def do_output_list(hc, args): -@@ -856,6 +860,7 @@ def do_resource_type_template(hc, args): - print(utils.format_output(template)) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to get the template for.')) - def do_template_show(hc, args): -@@ -929,6 +934,7 @@ def do_template_validate(hc, args): - print(jsonutils.dumps(validation, indent=2, ensure_ascii=False)) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to show the resources for.')) - @utils.arg('-n', '--nested-depth', metavar='', -@@ -970,6 +976,7 @@ def do_resource_list(hc, args): - utils.print_list(resources, fields, sortby_index=4) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to show the resource for.')) - @utils.arg('resource', metavar='', -@@ -1135,6 +1142,7 @@ def do_hook_clear(hc, args): - hook_type, resource_pattern) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to show the events for.')) - @utils.arg('-r', '--resource', metavar='', -@@ -1258,6 +1266,7 @@ def do_event(hc, args): - do_event_show(hc, args) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to show the events for.')) - @utils.arg('resource', metavar='', -@@ -1285,6 +1294,7 @@ def do_event_show(hc, args): - utils.print_dict(event.to_dict(), formatters=formatters) - - -+@utils.timestamp_converter - @utils.arg('-f', '--definition-file', metavar='', - help=_('Path to JSON/YAML containing map defining ' - ', , and .')) -@@ -1355,6 +1365,7 @@ def do_config_list(hc, args): - utils.print_list(scs, fields, sortby_index=None) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('ID of the config.')) - @utils.arg('-c', '--config-only', default=False, action="store_true", -@@ -1475,6 +1486,7 @@ def do_deployment_list(hc, args): - utils.print_list(deployments, fields, sortby_index=5) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('ID of the deployment.')) - def do_deployment_show(hc, args): -@@ -1490,6 +1502,7 @@ def do_deployment_show(hc, args): - print(jsonutils.dumps(sd.to_dict(), indent=2)) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('ID of the server to fetch deployments for.')) - def do_deployment_metadata_show(hc, args): -@@ -1535,6 +1548,7 @@ def do_deployment_delete(hc, args): - {'count': failure_count, 'total': len(args.id)}) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('ID deployment to show the output for.')) - @utils.arg('output', metavar='', nargs='?', default=None, -@@ -1589,6 +1603,7 @@ def do_build_info(hc, args): - utils.print_dict(result, formatters=formatters) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of stack to snapshot.')) - @utils.arg('-n', '--name', metavar='', -@@ -1608,6 +1623,7 @@ def do_stack_snapshot(hc, args): - print(jsonutils.dumps(snapshot, indent=2, ensure_ascii=False)) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of the stack containing the snapshot.')) - @utils.arg('snapshot', metavar='', -@@ -1655,6 +1671,7 @@ def do_stack_restore(hc, args): - raise exc.CommandError(_('Stack or snapshot not found')) - - -+@utils.timestamp_converter - @utils.arg('id', metavar='', - help=_('Name or ID of the stack containing the snapshots.')) - def do_snapshot_list(hc, args): -@@ -1678,6 +1695,7 @@ def do_snapshot_list(hc, args): - utils.print_list(snapshots["snapshots"], fields, formatters=formatters) - - -+@utils.timestamp_converter - def do_service_list(hc, args=None): - '''List the Heat engines.''' - show_deprecated('heat service-list', --- -1.8.3.1 - diff --git a/openstack/python-heatclient/centos/python-heatclient.spec b/openstack/python-heatclient/centos/python-heatclient.spec new file mode 100644 index 00000000..dd4e30a1 --- /dev/null +++ b/openstack/python-heatclient/centos/python-heatclient.spec @@ -0,0 +1,230 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname heatclient +%global with_doc 0 + + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the OpenStack Heat API. There's a Python API (the \ +heatclient module), and a command-line script (heat). Each implements 100% of \ +the OpenStack Heat API. + +Name: python-heatclient +Version: 1.16.1 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: Python API and CLI for OpenStack Heat + +License: ASL 2.0 +URL: https://launchpad.net/python-heatclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Heat +%{?python_provide:%python_provide python2-heatclient} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-pbr +BuildRequires: git + +Requires: python2-babel +Requires: python2-iso8601 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-prettytable +Requires: python2-pbr +Requires: python2-six +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-swiftclient >= 3.2.0 +Requires: python2-requests +Requires: python2-cliff +%if 0%{?fedora} > 0 +Requires: python2-pyyaml +%else +Requires: PyYAML +%endif + +%description -n python2-%{sname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Heat +%{?python_provide:%python_provide python3-heatclient} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + +Requires: python3-babel +Requires: python3-cliff +Requires: python3-iso8601 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-osc-lib >= 1.8.0 +Requires: python3-prettytable +Requires: python3-pbr +Requires: python3-six +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-swiftclient >= 3.2.0 +Requires: python3-requests +Requires: python3-PyYAML + +%description -n python3-%{sname} +%{common_desc} +%endif + +%if 0%{?with_doc} +%package doc +Summary: Documentation for OpenStack Heat API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-sphinxcontrib-apidoc +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-babel +BuildRequires: python2-iso8601 +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-osc-lib +BuildRequires: python2-prettytable +BuildRequires: python2-pbr +BuildRequires: python2-six +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-i18n +BuildRequires: python2-swiftclient +BuildRequires: python2-requests +BuildRequires: python2-cliff + +%description doc +%{common_desc} + +This package contains auto-generated documentation. +%endif + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +rm -rf {test-,}requirements.txt tools/{pip,test}-requires + + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +%py3_build +%endif + +%install +export PBR_VERSION=%{version} +%if 0%{?with_python3} +%py3_install +echo "%{version}" > %{buildroot}%{python3_sitelib}/heatclient/versioninfo +mv %{buildroot}%{_bindir}/heat %{buildroot}%{_bindir}/heat-%{python3_version} +ln -s ./heat-%{python3_version} %{buildroot}%{_bindir}/heat-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/heatclient/tests +%endif + +%py2_install +echo "%{version}" > %{buildroot}%{python2_sitelib}/heatclient/versioninfo +mv %{buildroot}%{_bindir}/heat %{buildroot}%{_bindir}/heat-%{python2_version} +ln -s ./heat-%{python2_version} %{buildroot}%{_bindir}/heat-2 + +ln -s ./heat-2 %{buildroot}%{_bindir}/heat + +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 tools/heat.bash_completion \ + %{buildroot}%{_sysconfdir}/bash_completion.d/heat + +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/heatclient/tests + +%if 0%{?with_doc} +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo + +# generate man page +sphinx-build -W -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/heat.1 %{buildroot}%{_mandir}/man1/heat.1 +%endif + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/heatclient +%{python2_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} +%{_mandir}/man1/heat.1.gz +%endif +%{_bindir}/heat +%{_bindir}/heat-2 +%{_bindir}/heat-%{python2_version} + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} +%{_mandir}/man1/heat.1.gz +%endif +%{_bindir}/heat-3 +%{_bindir}/heat-%{python3_version} +%endif + +%if 0%{?with_doc} +%files doc +%doc doc/build/html +%license LICENSE +%endif + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + +%files sdk +/usr/share/remote-clients/%{name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + + +%changelog +* Fri Aug 10 2018 RDO 1.16.1-1 +- Update to 1.16.1 + diff --git a/openstack/python-heatclient/centos/python-heatclient.spec.orig b/openstack/python-heatclient/centos/python-heatclient.spec.orig new file mode 100644 index 00000000..a7187a27 --- /dev/null +++ b/openstack/python-heatclient/centos/python-heatclient.spec.orig @@ -0,0 +1,185 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname heatclient + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the OpenStack Heat API. There's a Python API (the \ +heatclient module), and a command-line script (heat). Each implements 100% of \ +the OpenStack Heat API. + +Name: python-heatclient +Version: 1.16.1 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Heat + +License: ASL 2.0 +URL: https://launchpad.net/python-heatclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Heat +%{?python_provide:%python_provide python2-heatclient} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +BuildRequires: git + +Requires: python2-babel +Requires: python2-iso8601 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-prettytable +Requires: python2-pbr +Requires: python2-six +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-swiftclient >= 3.2.0 +Requires: python2-requests +Requires: python2-cliff +%if 0%{?fedora} > 0 +Requires: python2-pyyaml +%else +Requires: PyYAML +%endif + +%description -n python2-%{sname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Heat +%{?python_provide:%python_provide python3-heatclient} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + +Requires: python3-babel +Requires: python3-cliff +Requires: python3-iso8601 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-osc-lib >= 1.8.0 +Requires: python3-prettytable +Requires: python3-pbr +Requires: python3-six +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-swiftclient >= 3.2.0 +Requires: python3-requests +Requires: python3-PyYAML + +%description -n python3-%{sname} +%{common_desc} +%endif + +%package doc +Summary: Documentation for OpenStack Heat API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-babel +BuildRequires: python2-iso8601 +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-osc-lib +BuildRequires: python2-prettytable +BuildRequires: python2-pbr +BuildRequires: python2-six +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-i18n +BuildRequires: python2-swiftclient +BuildRequires: python2-requests +BuildRequires: python2-cliff + +%description doc +%{common_desc} + +This package contains auto-generated documentation. + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +rm -rf {test-,}requirements.txt tools/{pip,test}-requires + + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +%install +%if 0%{?with_python3} +%py3_install +echo "%{version}" > %{buildroot}%{python3_sitelib}/heatclient/versioninfo +mv %{buildroot}%{_bindir}/heat %{buildroot}%{_bindir}/heat-%{python3_version} +ln -s ./heat-%{python3_version} %{buildroot}%{_bindir}/heat-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/heatclient/tests +%endif + +%py2_install +echo "%{version}" > %{buildroot}%{python2_sitelib}/heatclient/versioninfo +mv %{buildroot}%{_bindir}/heat %{buildroot}%{_bindir}/heat-%{python2_version} +ln -s ./heat-%{python2_version} %{buildroot}%{_bindir}/heat-2 + +ln -s ./heat-2 %{buildroot}%{_bindir}/heat + +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 tools/heat.bash_completion \ + %{buildroot}%{_sysconfdir}/bash_completion.d/heat + +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/heatclient/tests + + +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo + +# generate man page +sphinx-build -W -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/heat.1 %{buildroot}%{_mandir}/man1/heat.1 + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/heatclient +%{python2_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/heat.1.gz +%{_bindir}/heat +%{_bindir}/heat-2 +%{_bindir}/heat-%{python2_version} + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/heat.1.gz +%{_bindir}/heat-3 +%{_bindir}/heat-%{python3_version} +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%changelog +* Fri Aug 10 2018 RDO 1.16.1-1 +- Update to 1.16.1 + diff --git a/openstack/python-heatclient/centos/srpm_path b/openstack/python-heatclient/centos/srpm_path deleted file mode 100644 index 1a807d9c..00000000 --- a/openstack/python-heatclient/centos/srpm_path +++ /dev/null @@ -1,2 +0,0 @@ -mirror:Source/python-heatclient-1.11.0-1.el7.src.rpm - diff --git a/openstack/python-ironicclient/centos/build_srpm.data b/openstack/python-ironicclient/centos/build_srpm.data index f46b146e..dec438d1 100644 --- a/openstack/python-ironicclient/centos/build_srpm.data +++ b/openstack/python-ironicclient/centos/build_srpm.data @@ -1,5 +1,3 @@ TAR_NAME="python-ironicclient" SRC_DIR="$CGCS_BASE/git/python-ironicclient" - -TIS_BASE_SRCREV=096834f09ae5d8cabc8c0b1ccbac271ddb13e2ee -TIS_PATCH_VER=1 +TIS_PATCH_VER=0 diff --git a/openstack/python-ironicclient/centos/python-ironicclient.spec b/openstack/python-ironicclient/centos/python-ironicclient.spec index 0bab47ab..ed2aa9b7 100644 --- a/openstack/python-ironicclient/centos/python-ironicclient.spec +++ b/openstack/python-ironicclient/centos/python-ironicclient.spec @@ -6,9 +6,11 @@ %global sname ironicclient +%global common_desc A python and command line client library for Ironic + Name: python-ironicclient -Version: 1.17.0 -Release: 0%{?_tis_dist}.%{tis_patch_ver} +Version: 2.5.0 +Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python client for Ironic License: ASL 2.0 @@ -18,38 +20,42 @@ BuildArch: noarch %description -A python and command line client library for Ironic. +%{common_desc} %package -n python2-%{sname} Summary: Python client for Ironic BuildRequires: python2-devel +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-setuptools BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-setuptools -Requires: python-appdirs >= 1.3.0 +Requires: python2-appdirs >= 1.3.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable +Requires: python2-six >= 1.10.0 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-requests +%if 0%{?fedora} > 0 +Requires: python2-dogpile-cache >= 0.6.2 +Requires: python2-jsonschema +Requires: python2-pyyaml +%else Requires: python-dogpile-cache >= 0.6.2 -Requires: python-httplib2 Requires: python-jsonschema -Requires: python-openstackclient >= 3.3.0 -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-pbr >= 2.0.0 -Requires: python-prettytable -Requires: python-six >= 1.9.0 -Requires: python-osc-lib >= 1.7.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: python-requests Requires: PyYAML +%endif %{?python_provide:%python_provide python2-%{sname}} %description -n python2-%{sname} -A python and command line client library for Ironic +%{common_desc} %if 0%{?with_python3} @@ -62,24 +68,22 @@ BuildRequires: python3-setuptools Requires: python3-appdirs >= 1.3.0 Requires: python3-dogpile-cache >= 0.6.2 -Requires: python3-httplib2 Requires: python3-jsonschema -Requires: python3-openstackclient >= 3.3.0 -Requires: python3-keystoneauth1 >= 3.1.0 +Requires: python3-keystoneauth1 >= 3.4.0 Requires: python3-pbr >= 2.0.0 Requires: python3-prettytable -Requires: python3-six >= 1.9.0 -Requires: python3-osc-lib >= 1.7.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.20.0 +Requires: python3-six >= 1.10.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 Requires: python3-requests Requires: python3-PyYAML %{?python_provide:%python_provide python3-%{sname}} %description -n python3-%{sname} -A python and command line client library for Ironic +%{common_desc} %endif %prep @@ -112,11 +116,10 @@ ln -s ./ironic-%{python2_version} %{buildroot}%{_bindir}/ironic-2 ln -s ./ironic-2 %{buildroot}%{_bindir}/ironic -install -p -D -m 644 tools/ironic.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/ironic.bash_completion - mkdir -p $RPM_BUILD_ROOT/wheels install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + %files -n python2-%{sname} %doc README.rst %license LICENSE @@ -125,7 +128,6 @@ install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ %{_bindir}/ironic-%{python2_version} %{python2_sitelib}/ironicclient* %{python2_sitelib}/python_ironicclient* -%{_sysconfdir}/bash_completion.d/ironic.bash_completion %if 0%{?with_python3} %files -n python3-%{sname} @@ -148,9 +150,6 @@ Contains python wheels for %{name} %changelog -* Wed Sep 06 2017 rdo-trunk 1.17.0-1 -- Update to 1.17.0 - -* Mon Aug 14 2017 Alfredo Moralejo 1.16.0-1 -- Update to 1.16.0 +* Fri Aug 10 2018 RDO 2.5.0-1 +- Update to 2.5.0 diff --git a/openstack/python-ironicclient/centos/python-ironicclient.spec.orig b/openstack/python-ironicclient/centos/python-ironicclient.spec.orig new file mode 100644 index 00000000..6afc704e --- /dev/null +++ b/openstack/python-ironicclient/centos/python-ironicclient.spec.orig @@ -0,0 +1,138 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global sname ironicclient + +%global common_desc A python and command line client library for Ironic + +Name: python-ironicclient +Version: 2.5.0 +Release: 1%{?dist} +Summary: Python client for Ironic + +License: ASL 2.0 +URL: https://pypi.python.org/pypi/python-ironicclient +Source0: https://tarballs.openstack.org/python-ironicclient/python-ironicclient-%{version}%{?milestone}.tar.gz +BuildArch: noarch + + +%description +%{common_desc} + + +%package -n python2-%{sname} +Summary: Python client for Ironic + +BuildRequires: python2-devel +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-setuptools + +Requires: python2-appdirs >= 1.3.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable +Requires: python2-six >= 1.10.0 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-requests +%if 0%{?fedora} > 0 +Requires: python2-dogpile-cache >= 0.6.2 +Requires: python2-jsonschema +Requires: python2-pyyaml +%else +Requires: python-dogpile-cache >= 0.6.2 +Requires: python-jsonschema +Requires: PyYAML +%endif + +%{?python_provide:%python_provide python2-%{sname}} + +%description -n python2-%{sname} +%{common_desc} + + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python client for Ironic + +BuildRequires: python3-devel +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-setuptools + +Requires: python3-appdirs >= 1.3.0 +Requires: python3-dogpile-cache >= 0.6.2 +Requires: python3-jsonschema +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-prettytable +Requires: python3-six >= 1.10.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-requests +Requires: python3-PyYAML + +%{?python_provide:%python_provide python3-%{sname}} + +%description -n python3-%{sname} +%{common_desc} +%endif + +%prep +%setup -q -n %{name}-%{upstream_version} + +# Remove the requirements file so that pbr hooks don't add it +# to distutils requires_dist config +rm -rf {test-,}requirements.txt tools/{pip,test}-requires + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/ironic %{buildroot}%{_bindir}/ironic-%{python3_version} +ln -s ./ironic-%{python3_version} %{buildroot}%{_bindir}/ironic-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/ironic %{buildroot}%{_bindir}/ironic-%{python2_version} +ln -s ./ironic-%{python2_version} %{buildroot}%{_bindir}/ironic-2 + +ln -s ./ironic-2 %{buildroot}%{_bindir}/ironic + + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/ironic +%{_bindir}/ironic-2 +%{_bindir}/ironic-%{python2_version} +%{python2_sitelib}/ironicclient* +%{python2_sitelib}/python_ironicclient* + +%if 0%{?with_python3} +%files -n python3-%{sname} +%doc README.rst +%license LICENSE +%{_bindir}/ironic-3 +%{_bindir}/ironic-%{python3_version} +%{python3_sitelib}/ironicclient* +%{python3_sitelib}/python_ironicclient* +%endif + + +%changelog +* Fri Aug 10 2018 RDO 2.5.0-1 +- Update to 2.5.0 + diff --git a/openstack/python-keystoneclient/centos/build_srpm.data b/openstack/python-keystoneclient/centos/build_srpm.data index c66bf348..2aaf1fbb 100644 --- a/openstack/python-keystoneclient/centos/build_srpm.data +++ b/openstack/python-keystoneclient/centos/build_srpm.data @@ -1 +1,4 @@ -TIS_PATCH_VER=7 +TAR_NAME=python-keystoneclient +SRC_DIR=$CGCS_BASE/git/python-keystoneclient +TIS_PATCH_VER=0 + diff --git a/openstack/python-keystoneclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/openstack/python-keystoneclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index ca1e1ae1..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SPECS/python-keystoneclient.spec b/SPECS/python-keystoneclient.spec -index 79ab30f..e68bc6f 100644 ---- a/SPECS/python-keystoneclient.spec -+++ b/SPECS/python-keystoneclient.spec -@@ -8,7 +8,7 @@ - Name: python-keystoneclient - Epoch: 1 - Version: 3.13.0 --Release: 1%{?dist} -+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: Client library for OpenStack Identity API - License: ASL 2.0 - URL: https://launchpad.net/python-keystoneclient diff --git a/openstack/python-keystoneclient/centos/meta_patches/0002-meta-public-adminURL-detection.patch b/openstack/python-keystoneclient/centos/meta_patches/0002-meta-public-adminURL-detection.patch deleted file mode 100644 index b3cafac8..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/0002-meta-public-adminURL-detection.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/SPECS/python-keystoneclient.spec b/SPECS/python-keystoneclient.spec -index e68bc6f..c71629d 100644 ---- a/SPECS/python-keystoneclient.spec -+++ b/SPECS/python-keystoneclient.spec -@@ -14,6 +14,11 @@ License: ASL 2.0 - URL: https://launchpad.net/python-keystoneclient - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz - -+# WRS -+Patch0001: internal-keystone-client-public-adminURL-detection.patch -+ -+# BuildArch needs to be located below patches in the spec file -+ - BuildArch: noarch - - BuildRequires: /usr/bin/openssl diff --git a/openstack/python-keystoneclient/centos/meta_patches/0003-meta-TiS-remote-client-sdk-patch.patch b/openstack/python-keystoneclient/centos/meta_patches/0003-meta-TiS-remote-client-sdk-patch.patch deleted file mode 100644 index 2417f565..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/0003-meta-TiS-remote-client-sdk-patch.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/SPECS/python-keystoneclient.spec b/SPECS/python-keystoneclient.spec -index 2844d30..edd6720 100644 ---- a/SPECS/python-keystoneclient.spec -+++ b/SPECS/python-keystoneclient.spec -@@ -167,6 +167,12 @@ BuildRequires: python-openstackdocstheme - %description doc - Documentation for the keystoneclient module - -+%package sdk -+Summary: SDK files for %{name} -+ -+%description sdk -+Contains SDK files for %{name} package -+ - %prep - %autosetup -n %{name}-%{upstream_version} -S git - -@@ -194,6 +200,10 @@ rm -rf {test-,}requirements.txt - # Fix hidden-file-or-dir warnings - rm -fr doc/build/html/.{doctrees,buildinfo} - -+# prep SDK package -+mkdir -p %{buildroot}/usr/share/remote-clients/%{name} -+tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} -+ - - %check - %{__python2} setup.py test -@@ -202,6 +212,7 @@ rm -fr .testrepository - %{__python3} setup.py test - %endif - -+ - %files -n python2-keystoneclient - %license LICENSE - %doc README.rst -@@ -232,6 +243,10 @@ rm -fr .testrepository - %{python3_sitelib}/keystoneclient/tests - %endif - -+%files sdk -+/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz -+ -+ - %changelog - * Fri Aug 11 2017 Alfredo Moralejo 1:3.13.0-1 - - Update to 3.13.0 diff --git a/openstack/python-keystoneclient/centos/meta_patches/0004-meta-dont-remove-requirements-txt.patch b/openstack/python-keystoneclient/centos/meta_patches/0004-meta-dont-remove-requirements-txt.patch deleted file mode 100644 index 457afaa1..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/0004-meta-dont-remove-requirements-txt.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SPECS/python-keystoneclient.spec b/SPECS/python-keystoneclient.spec -index edd6720..a41311e 100644 ---- a/SPECS/python-keystoneclient.spec -+++ b/SPECS/python-keystoneclient.spec -@@ -181,7 +181,7 @@ Contains SDK files for %{name} package - sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg - - # Let RPM handle the dependencies --rm -rf {test-,}requirements.txt -+rm -f test-requirements.txt - - %build - %py2_build diff --git a/openstack/python-keystoneclient/centos/meta_patches/0006-meta-buildrequires-python-setuptools_scm.patch b/openstack/python-keystoneclient/centos/meta_patches/0006-meta-buildrequires-python-setuptools_scm.patch deleted file mode 100644 index b5e83be4..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/0006-meta-buildrequires-python-setuptools_scm.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/SPECS/python-keystoneclient.spec b/SPECS/python-keystoneclient.spec -index 965c437..efc0c4b 100644 ---- a/SPECS/python-keystoneclient.spec -+++ b/SPECS/python-keystoneclient.spec -@@ -34,6 +34,7 @@ Summary: Client library for OpenStack Identity API - - BuildRequires: python2-devel - BuildRequires: python-setuptools -+BuildRequires: python2-setuptools_scm - BuildRequires: python-pbr >= 2.0.0 - BuildRequires: git - -@@ -61,6 +62,7 @@ Summary: Client library for OpenStack Identity API - - BuildRequires: python3-devel - BuildRequires: python3-setuptools -+BuildRequires: python3-setuptools_scm - BuildRequires: python3-pbr >= 2.0.0 - - Requires: python3-oslo-config >= 2:4.0.0 diff --git a/openstack/python-keystoneclient/centos/meta_patches/PATCH_ORDER b/openstack/python-keystoneclient/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 3a2b04aa..00000000 --- a/openstack/python-keystoneclient/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,5 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-meta-public-adminURL-detection.patch -0003-meta-TiS-remote-client-sdk-patch.patch -0004-meta-dont-remove-requirements-txt.patch -0006-meta-buildrequires-python-setuptools_scm.patch diff --git a/openstack/python-keystoneclient/centos/patches/internal-keystone-client-public-adminURL-detection.patch b/openstack/python-keystoneclient/centos/patches/internal-keystone-client-public-adminURL-detection.patch deleted file mode 100644 index af5c7cc9..00000000 --- a/openstack/python-keystoneclient/centos/patches/internal-keystone-client-public-adminURL-detection.patch +++ /dev/null @@ -1,55 +0,0 @@ -From e9d61bd41cfbe8cf424d13052c35f298f5beb1e2 Mon Sep 17 00:00:00 2001 -From: Scott Little -Date: Tue, 24 Jan 2017 15:19:33 -0500 -Subject: [PATCH] TiS-remote-client-sdk-patch - ---- - keystoneclient/v2_0/client.py | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/keystoneclient/v2_0/client.py b/keystoneclient/v2_0/client.py -index 904f769..003c5b1 100644 ---- a/keystoneclient/v2_0/client.py -+++ b/keystoneclient/v2_0/client.py -@@ -13,6 +13,7 @@ - # License for the specific language governing permissions and limitations - # under the License. - -+import os - import logging - import warnings - -@@ -30,6 +31,9 @@ from keystoneclient.v2_0 import tenants - from keystoneclient.v2_0 import tokens - from keystoneclient.v2_0 import users - -+import requests -+from requests.packages.urllib3.exceptions import InsecureRequestWarning -+from requests.packages.urllib3 import disable_warnings as urllib3_disable_warnings - - _logger = logging.getLogger(__name__) - -@@ -154,6 +158,20 @@ class Client(httpclient.HTTPClient): - 'deprecated as of the 1.7.0 release and may be removed in ' - 'the 2.0.0 release.', DeprecationWarning) - -+ # NOTE(knasim-wrs): As per US76645, the Keystone adminURL -+ # is no longer an internal address since it needs to be -+ # accessible via remote Openstack client. Things get -+ # complicated with HTTPS where the internal keystone client -+ # gets this adminURL and cannot connect to Keystone server -+ # as it cannot verify the SSL certificate. -+ # We will check for this condition here, if OS_ENDPOINT_TYPE -+ # is not publicURL then this is an internal access scenario and -+ # Keystone client will be set to SSL insecure mode -+ if os.environ.get('OS_ENDPOINT_TYPE') == 'internalURL': -+ kwargs['insecure'] = True -+ # disable verbose insecurity warnings -+ urllib3_disable_warnings(InsecureRequestWarning) -+ - super(Client, self).__init__(**kwargs) - - self.certificates = certificates.CertificatesManager(self._adapter) --- -1.8.3.1 - diff --git a/openstack/python-keystoneclient/centos/python-keystoneclient.spec b/openstack/python-keystoneclient/centos/python-keystoneclient.spec new file mode 100644 index 00000000..82f73902 --- /dev/null +++ b/openstack/python-keystoneclient/centos/python-keystoneclient.spec @@ -0,0 +1,278 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +Client library and command line utility for interacting with Openstack \ +Identity API. + +Name: python-keystoneclient +Epoch: 1 +Version: 3.17.0 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: Client library for OpenStack Identity API +License: ASL 2.0 +URL: https://launchpad.net/python-keystoneclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: /usr/bin/openssl + + +%description +%{common_desc} + +%package -n python2-keystoneclient +Summary: Client library for OpenStack Identity API +%{?python_provide:%python_provide python2-keystoneclient} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: git + +Requires: python2-oslo-config >= 2:5.2.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-stevedore >= 1.20.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-debtcollector >= 1.2.0 +Requires: python2-keystoneauth1 >= 3.4.0 +%if 0%{?fedora} > 0 +Requires: python2-keyring >= 5.5.1 +%else +Requires: python-keyring >= 5.5.1 +%endif + +%description -n python2-keystoneclient +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-keystoneclient +Summary: Client library for OpenStack Identity API +%{?python_provide:%python_provide python3-keystoneclient} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr >= 2.0.0 + +Requires: python3-oslo-config >= 2:5.2.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-requests >= 2.14.2 +Requires: python3-six >= 1.10.0 +Requires: python3-stevedore >= 1.20.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-debtcollector >= 1.2.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keyring >= 5.5.1 + +%description -n python3-keystoneclient +Client library for interacting with Openstack Identity API. +%endif + +%package -n python2-keystoneclient-tests +Summary: python2-keystoneclient test subpackage +Requires: python2-keystoneclient = %{epoch}:%{version}-%{release} + +BuildRequires: python2-hacking +BuildRequires: python2-fixtures +BuildRequires: python2-mock +BuildRequires: python2-oauthlib +BuildRequires: python2-oslotest +BuildRequires: python2-testtools +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-config +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-i18n +BuildRequires: python2-stestr +BuildRequires: python2-testresources +BuildRequires: python2-testscenarios +%if 0%{?fedora} > 0 +BuildRequires: python2-keyring >= 5.5.1 +BuildRequires: python2-lxml +BuildRequires: python2-requests-mock +%else +BuildRequires: python-keyring >= 5.5.1 +BuildRequires: python-lxml +BuildRequires: python-requests-mock +%endif + +Requires: python2-hacking +Requires: python2-fixtures +Requires: python2-mock +Requires: python2-oauthlib +Requires: python2-oslotest +Requires: python2-stestr +Requires: python2-testtools +Requires: python2-testresources +Requires: python2-testscenarios +%if 0%{?fedora} > 0 +Requires: python2-lxml +Requires: python2-requests-mock +%else +Requires: python-lxml +Requires: python-requests-mock +%endif + + +%description -n python2-keystoneclient-tests +python2-keystoneclient test subpackages + +%if 0%{?with_python3} +%package -n python3-keystoneclient-tests +Summary: python3-keystoneclient test subpackage +Requires: python3-keystoneclient = %{epoch}:%{version}-%{release} + +BuildRequires: python3-hacking +BuildRequires: python3-fixtures +BuildRequires: python3-keyring >= 5.5.1 +BuildRequires: python3-lxml +BuildRequires: python3-mock +BuildRequires: python3-oauthlib +BuildRequires: python3-oslotest +BuildRequires: python3-requests-mock +BuildRequires: python3-testresources +BuildRequires: python3-testscenarios +BuildRequires: python3-testtools +BuildRequires: python3-keystoneauth1 +BuildRequires: python3-oslo-config +BuildRequires: python3-oslo-utils +BuildRequires: python3-oslo-serialization +BuildRequires: python3-oslo-i18n +BuildRequires: python3-stestr + +Requires: python3-hacking +Requires: python3-fixtures +Requires: python3-lxml +Requires: python3-mock +Requires: python3-oauthlib +Requires: python3-oslotest +Requires: python3-requests-mock +Requires: python3-stestr +Requires: python3-testresources +Requires: python3-testscenarios +Requires: python3-testtools + + +%description -n python3-keystoneclient-tests +python3-keystoneclient test subpackages +%endif + +%package doc +Summary: Documentation for OpenStack Keystone API client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme + +%description doc +Documentation for the keystoneclient module + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# disable warning-is-error, this project has intersphinx in docs +# so some warnings are generated in network isolated build environment +# as koji +sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg + +# Let RPM handle the dependencies +rm -rf {test-,}requirements.txt + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +%py3_build +%endif + +%install +export PBR_VERSION=%{version} +%py2_install +%if 0%{?with_python3} +%py3_install +%endif + +# Build HTML docs +%{__python2} setup.py build_sphinx -b html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.{doctrees,buildinfo} + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + +%check +stestr --test-path=./keystoneclient/tests/unit run +%if 0%{?with_python3} +stestr-3 --test-path=./keystoneclient/tests/unit run +%endif + +%files -n python2-keystoneclient +%license LICENSE +%doc README.rst +%{python2_sitelib}/keystoneclient +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/keystoneclient/tests + +%if 0%{?with_python3} +%files -n python3-keystoneclient +%license LICENSE +%doc README.rst +%{python3_sitelib}/keystoneclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/keystoneclient/tests +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%files -n python2-keystoneclient-tests +%license LICENSE +%{python2_sitelib}/keystoneclient/tests + +%if 0%{?with_python3} +%files -n python3-keystoneclient-tests +%license LICENSE +%{python3_sitelib}/keystoneclient/tests +%endif + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + +%files sdk +/usr/share/remote-clients/%{name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + + +%changelog +* Wed Aug 08 2018 RDO 1:3.17.0-1 +- Update to 3.17.0 + diff --git a/openstack/python-keystoneclient/centos/python-keystoneclient.spec.orig b/openstack/python-keystoneclient/centos/python-keystoneclient.spec.orig new file mode 100644 index 00000000..3060722f --- /dev/null +++ b/openstack/python-keystoneclient/centos/python-keystoneclient.spec.orig @@ -0,0 +1,247 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +Client library and command line utility for interacting with Openstack \ +Identity API. + +Name: python-keystoneclient +Epoch: 1 +Version: 3.17.0 +Release: 1%{?dist} +Summary: Client library for OpenStack Identity API +License: ASL 2.0 +URL: https://launchpad.net/python-keystoneclient +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: /usr/bin/openssl + + +%description +%{common_desc} + +%package -n python2-keystoneclient +Summary: Client library for OpenStack Identity API +%{?python_provide:%python_provide python2-keystoneclient} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: git + +Requires: python2-oslo-config >= 2:5.2.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-stevedore >= 1.20.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-debtcollector >= 1.2.0 +Requires: python2-keystoneauth1 >= 3.4.0 +%if 0%{?fedora} > 0 +Requires: python2-keyring >= 5.5.1 +%else +Requires: python-keyring >= 5.5.1 +%endif + +%description -n python2-keystoneclient +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-keystoneclient +Summary: Client library for OpenStack Identity API +%{?python_provide:%python_provide python3-keystoneclient} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr >= 2.0.0 + +Requires: python3-oslo-config >= 2:5.2.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-requests >= 2.14.2 +Requires: python3-six >= 1.10.0 +Requires: python3-stevedore >= 1.20.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-debtcollector >= 1.2.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keyring >= 5.5.1 + +%description -n python3-keystoneclient +Client library for interacting with Openstack Identity API. +%endif + +%package -n python2-keystoneclient-tests +Summary: python2-keystoneclient test subpackage +Requires: python2-keystoneclient = %{epoch}:%{version}-%{release} + +BuildRequires: python2-hacking +BuildRequires: python2-fixtures +BuildRequires: python2-mock +BuildRequires: python2-oauthlib +BuildRequires: python2-oslotest +BuildRequires: python2-testtools +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-config +BuildRequires: python2-oslo-utils +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-i18n +BuildRequires: python2-stestr +BuildRequires: python2-testresources +BuildRequires: python2-testscenarios +%if 0%{?fedora} > 0 +BuildRequires: python2-keyring >= 5.5.1 +BuildRequires: python2-lxml +BuildRequires: python2-requests-mock +%else +BuildRequires: python-keyring >= 5.5.1 +BuildRequires: python-lxml +BuildRequires: python-requests-mock +%endif + +Requires: python2-hacking +Requires: python2-fixtures +Requires: python2-mock +Requires: python2-oauthlib +Requires: python2-oslotest +Requires: python2-stestr +Requires: python2-testtools +Requires: python2-testresources +Requires: python2-testscenarios +%if 0%{?fedora} > 0 +Requires: python2-lxml +Requires: python2-requests-mock +%else +Requires: python-lxml +Requires: python-requests-mock +%endif + + +%description -n python2-keystoneclient-tests +python2-keystoneclient test subpackages + +%if 0%{?with_python3} +%package -n python3-keystoneclient-tests +Summary: python3-keystoneclient test subpackage +Requires: python3-keystoneclient = %{epoch}:%{version}-%{release} + +BuildRequires: python3-hacking +BuildRequires: python3-fixtures +BuildRequires: python3-keyring >= 5.5.1 +BuildRequires: python3-lxml +BuildRequires: python3-mock +BuildRequires: python3-oauthlib +BuildRequires: python3-oslotest +BuildRequires: python3-requests-mock +BuildRequires: python3-testresources +BuildRequires: python3-testscenarios +BuildRequires: python3-testtools +BuildRequires: python3-keystoneauth1 +BuildRequires: python3-oslo-config +BuildRequires: python3-oslo-utils +BuildRequires: python3-oslo-serialization +BuildRequires: python3-oslo-i18n +BuildRequires: python3-stestr + +Requires: python3-hacking +Requires: python3-fixtures +Requires: python3-lxml +Requires: python3-mock +Requires: python3-oauthlib +Requires: python3-oslotest +Requires: python3-requests-mock +Requires: python3-stestr +Requires: python3-testresources +Requires: python3-testscenarios +Requires: python3-testtools + + +%description -n python3-keystoneclient-tests +python3-keystoneclient test subpackages +%endif + +%package doc +Summary: Documentation for OpenStack Keystone API client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme + +%description doc +Documentation for the keystoneclient module + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# disable warning-is-error, this project has intersphinx in docs +# so some warnings are generated in network isolated build environment +# as koji +sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg + +# Let RPM handle the dependencies +rm -rf {test-,}requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +%install +%py2_install +%if 0%{?with_python3} +%py3_install +%endif + +# Build HTML docs +%{__python2} setup.py build_sphinx -b html +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.{doctrees,buildinfo} + + +%check +stestr --test-path=./keystoneclient/tests/unit run +%if 0%{?with_python3} +stestr-3 --test-path=./keystoneclient/tests/unit run +%endif + +%files -n python2-keystoneclient +%license LICENSE +%doc README.rst +%{python2_sitelib}/keystoneclient +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/keystoneclient/tests + +%if 0%{?with_python3} +%files -n python3-keystoneclient +%license LICENSE +%doc README.rst +%{python3_sitelib}/keystoneclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/keystoneclient/tests +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%files -n python2-keystoneclient-tests +%license LICENSE +%{python2_sitelib}/keystoneclient/tests + +%if 0%{?with_python3} +%files -n python3-keystoneclient-tests +%license LICENSE +%{python3_sitelib}/keystoneclient/tests +%endif + +%changelog +* Wed Aug 08 2018 RDO 1:3.17.0-1 +- Update to 3.17.0 + diff --git a/openstack/python-keystoneclient/centos/srpm_path b/openstack/python-keystoneclient/centos/srpm_path deleted file mode 100644 index d2bd6c67..00000000 --- a/openstack/python-keystoneclient/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-keystoneclient-3.13.0-1.el7.src.rpm diff --git a/openstack/python-keystoneclient/python-keystoneclient/CGCSkeyringsupport.patch b/openstack/python-keystoneclient/python-keystoneclient/CGCSkeyringsupport.patch deleted file mode 100644 index 9777de3b..00000000 --- a/openstack/python-keystoneclient/python-keystoneclient/CGCSkeyringsupport.patch +++ /dev/null @@ -1,144 +0,0 @@ -Index: git/keystoneclient/shell.py -=================================================================== ---- git.orig/keystoneclient/shell.py 2014-09-17 13:06:07.761186569 -0400 -+++ git/keystoneclient/shell.py 2014-09-22 15:10:36.326737219 -0400 -@@ -24,6 +24,7 @@ - - from __future__ import print_function - -+import os - import argparse - import getpass - import logging -@@ -32,6 +33,8 @@ - - import six - -+import keyring -+ - import keystoneclient - from keystoneclient import access - from keystoneclient.contrib.bootstrap import shell as shell_bootstrap -@@ -333,6 +336,11 @@ - '--os-username or env[OS_USERNAME]') - - if not args.os_password: -+ # priviledge check (only allow Keyring retrieval if we are root) -+ if os.geteuid() == 0: -+ args.os_password = keyring.get_password('CGCS', args.os_username) -+ -+ if not args.os_password: - # No password, If we've got a tty, try prompting for it - if hasattr(sys.stdin, 'isatty') and sys.stdin.isatty(): - # Check for Ctl-D -Index: git/keystoneclient/probe.py -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ git/keystoneclient/probe.py 2014-09-23 10:41:57.758412311 -0400 -@@ -0,0 +1,106 @@ -+# -+# Copyright (c) 2014 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -+ -+""" -+OCF sanity probe to prevent cleartext password -+""" -+ -+import os -+import sys -+import json -+import urllib2 -+import datetime -+import keyring -+import logging -+import logging.handlers -+ -+_loggers = {} -+ -+def get_logger(name): -+ """ Get a logger or create one """ -+ if name not in _loggers: -+ _loggers[name] = logging.getLogger(name) -+ -+ return _loggers[name] -+ -+ -+def setup_logger(logger): -+ """ Setup a logger """ -+ syslog_facility = logging.handlers.SysLogHandler.LOG_SYSLOG -+ -+ formatter = logging.Formatter("probe_keyring[%(process)d] " + -+ "%(pathname)s:%(lineno)s " + -+ "%(levelname)8s [%(name)s] %(message)s") -+ -+ handler = logging.handlers.SysLogHandler(address='/dev/log', -+ facility=syslog_facility) -+ handler.setLevel(logging.INFO) -+ handler.setFormatter(formatter) -+ -+ logger.addHandler(handler) -+ logger.setLevel(logging.INFO) -+ -+def configure(): -+ """ Setup logging """ -+ for logger in _loggers: -+ setup_logger(_loggers[logger]) -+ -+LOG = get_logger(__name__) -+ -+def probe(auth_url, tenant, login): -+ """ Asks OpenStack Keystone for a token """ -+ -+ try: -+ url = auth_url + "tokens" -+ request_info = urllib2.Request(url) -+ request_info.add_header("Content-type", "application/json") -+ request_info.add_header("Accept", "application/json") -+ payload = json.dumps( -+ {"auth": {"tenantName": tenant, -+ "passwordCredentials": {"username": login, -+ "password": keyring.get_password('CGCS',login)}}}) -+ request_info.add_data(payload) -+ -+ request = urllib2.urlopen(request_info) -+ response = json.loads(request.read()) -+ request.close() -+ return response['access']['token']['id'] -+ -+ except Exception as e: -+ LOG.error("%s, %s" % (e.code, e.read())) -+ return None -+ -+def main(): -+ -+ global cmd_auth_url -+ global cmd_tenant -+ global cmd_os_username -+ -+ cmd_auth_url = "http://127.0.0.1:5000/v2.0/tokens" -+ cmd_tenant = "tenant" -+ cmd_os_username = "username" -+ -+ configure() -+ -+# priviledge check (only allow Keyring retrieval if we are root) -+ if os.geteuid() == 0: -+ arg = 1 -+ cmd_auth_url = sys.argv[arg] -+ arg += 1 -+ cmd_tenant = sys.argv[arg] -+ arg += 1 -+ cmd_os_username = sys.argv[arg] -+ -+ try: -+ token_id = probe(cmd_auth_url, cmd_tenant, cmd_os_username) -+ if token_id is None: -+ sys.exit(-1) -+ sys.exit(0) -+ except Exception as e: -+ sys.exit(-1) -+ diff --git a/openstack/python-keystoneclient/python-keystoneclient/extend_token_expiry_window.patch b/openstack/python-keystoneclient/python-keystoneclient/extend_token_expiry_window.patch deleted file mode 100644 index 715aa7de..00000000 --- a/openstack/python-keystoneclient/python-keystoneclient/extend_token_expiry_window.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: python-keystoneclient-1.3.1/keystoneclient/auth/identity/base.py -=================================================================== ---- python-keystoneclient-1.3.1.orig/keystoneclient/auth/identity/base.py -+++ python-keystoneclient-1.3.1/keystoneclient/auth/identity/base.py -@@ -34,8 +34,9 @@ def get_options(): - @six.add_metaclass(abc.ABCMeta) - class BaseIdentityPlugin(base.BaseAuthPlugin): - -- # we count a token as valid if it is valid for at least this many seconds -- MIN_TOKEN_LIFE_SECONDS = 1 -+ # we count a token as valid (not needing refreshing) if it is valid for at -+ # least this many seconds before the token expiry time -+ MIN_TOKEN_LIFE_SECONDS = 120 - - def __init__(self, - auth_url=None, diff --git a/openstack/python-keystoneclient/python-keystoneclient/internal-keystone-client-public-adminURL-detection.patch b/openstack/python-keystoneclient/python-keystoneclient/internal-keystone-client-public-adminURL-detection.patch deleted file mode 100644 index fb64fed0..00000000 --- a/openstack/python-keystoneclient/python-keystoneclient/internal-keystone-client-public-adminURL-detection.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- - keystoneclient/v2_0/client.py | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - ---- a/keystoneclient/v2_0/client.py -+++ b/keystoneclient/v2_0/client.py -@@ -13,6 +13,7 @@ - # License for the specific language governing permissions and limitations - # under the License. - -+import os - import logging - - from keystoneclient.auth.identity import v2 as v2_auth -@@ -29,6 +30,8 @@ from keystoneclient.v2_0 import tenants - from keystoneclient.v2_0 import tokens - from keystoneclient.v2_0 import users - -+import requests -+from requests.packages.urllib3.exceptions import InsecureRequestWarning - - _logger = logging.getLogger(__name__) - -@@ -130,6 +133,21 @@ class Client(httpclient.HTTPClient): - - def __init__(self, **kwargs): - """Initialize a new client for the Keystone v2.0 API.""" -+ -+ # NOTE(knasim-wrs): As per US76645, the Keystone adminURL -+ # is no longer an internal address since it needs to be -+ # accessible via remote Openstack client. Things get -+ # complicated with HTTPS where the internal keystone client -+ # gets this adminURL and cannot connect to Keystone server -+ # as it cannot verify the SSL certificate. -+ # We will check for this condition here, if OS_ENDPOINT_TYPE -+ # is not publicURL then this is an internal access scenario and -+ # Keystone client will be set to SSL insecure mode -+ if os.environ.get('OS_ENDPOINT_TYPE') == 'internalURL': -+ kwargs['insecure'] = True -+ # disable verbose insecurity warnings -+ requests.packages.urllib3.disable_warnings(InsecureRequestWarning) -+ - super(Client, self).__init__(**kwargs) - - self.certificates = certificates.CertificatesManager(self._adapter) diff --git a/openstack/python-keystoneclient/python-keystoneclient/v2-client-empty-password-check.patch b/openstack/python-keystoneclient/python-keystoneclient/v2-client-empty-password-check.patch deleted file mode 100644 index a7988f05..00000000 --- a/openstack/python-keystoneclient/python-keystoneclient/v2-client-empty-password-check.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - keystoneclient/v2_0/shell.py | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/keystoneclient/v2_0/shell.py -+++ b/keystoneclient/v2_0/shell.py -@@ -141,7 +141,8 @@ def do_user_password_update(kc, args): - """Update user password.""" - user = utils.find_resource(kc.users, args.user) - new_passwd = args.passwd or utils.prompt_for_password() -- if new_passwd is None: -+ # if password is empty or blank then reject it -+ if new_passwd is None or new_passwd.strip() is "": - msg = (_("\nPlease specify password using the --pass option " - "or using the prompt")) - sys.exit(msg) -@@ -167,7 +168,8 @@ def do_password_update(kc, args): - currentpasswd = getpass.getpass(_('Current Password: ')) - - newpasswd = args.newpasswd -- while newpasswd is None: -+ # don't allow empty or blank passwords -+ while newpasswd is None or newpasswd.strip() is "": - passwd1 = getpass.getpass(_('New Password: ')) - passwd2 = getpass.getpass(_('Repeat New Password: ')) - if passwd1 == passwd2: diff --git a/openstack/python-magnumclient/centos/build_srpm.data b/openstack/python-magnumclient/centos/build_srpm.data index c5803ec7..6c0a4387 100644 --- a/openstack/python-magnumclient/centos/build_srpm.data +++ b/openstack/python-magnumclient/centos/build_srpm.data @@ -1,6 +1,4 @@ TAR_NAME="python-magnumclient" SRC_DIR="$CGCS_BASE/git/python-magnumclient" - -TIS_BASE_SRCREV=6bef59aec50e41ec2133fad1bd1fc4c954a08312 -TIS_PATCH_VER=1 +TIS_PATCH_VER=0 diff --git a/openstack/python-magnumclient/centos/python-magnumclient.spec b/openstack/python-magnumclient/centos/python-magnumclient.spec index a403e0e2..d5c2071a 100644 --- a/openstack/python-magnumclient/centos/python-magnumclient.spec +++ b/openstack/python-magnumclient/centos/python-magnumclient.spec @@ -9,8 +9,15 @@ %global default_python 2 %endif +%global common_desc \ +This is a client library for Magnum built on the Magnum API. \ +It provides a Python API (the magnumclient module) and a \ +command-line tool (magnum). + +%global common_desc_tests Python-magnumclient test subpackage + Name: python-%{pname} -Version: 2.7.0 +Version: 2.10.0 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Client library for Magnum API @@ -20,49 +27,54 @@ Source0: https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_vers BuildArch: noarch %description -This is a client library for Magnum built on the Magnum API. -It provides a Python API (the magnumclient module) and a -command-line tool (magnum). +%{common_desc} %package -n python2-%{pname} Summary: Client library for Magnum API %{?python_provide:%python_provide python2-%{pname}} BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-pbr +BuildRequires: python2-pbr BuildRequires: git # test dependencies -BuildRequires: python-oslo-utils -BuildRequires: python-stevedore -BuildRequires: python-requests -BuildRequires: python-oslo-i18n -BuildRequires: python-fixtures -BuildRequires: python-mock -BuildRequires: python-testtools -BuildRequires: python-keystoneauth1 -BuildRequires: python-prettytable +BuildRequires: python2-oslo-utils +BuildRequires: python2-openstackclient +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-log +BuildRequires: python2-osprofiler +BuildRequires: python2-stevedore +BuildRequires: python2-requests +BuildRequires: python2-oslo-i18n +BuildRequires: python2-fixtures +BuildRequires: python2-mock +BuildRequires: python2-testtools +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-prettytable -Requires: python-babel -Requires: python-cryptography +Requires: python2-babel +Requires: python2-cryptography +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-os-client-config >= 1.28.0 +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-six +%if 0%{?fedora} > 0 +Requires: python2-decorator +%else Requires: python-decorator -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: python-osc-lib >= 1.7.0 -Requires: python-os-client-config >= 1.28.0 -Requires: python-pbr -Requires: python-prettytable -Requires: python-six +%endif %description -n python2-%{pname} -This is a client library for Magnum built on the Magnum API. -It provides a Python API (the magnumclient module) and a -command-line tool (magnum). +%{common_desc} %if 0%{?with_python3} %package -n python3-%{pname} @@ -75,6 +87,10 @@ BuildRequires: python3-pbr # test dependencies BuildRequires: python3-oslo-utils +BuildRequires: python3-openstackclient +BuildRequires: python3-oslo-serialization +BuildRequires: python3-oslo-log +BuildRequires: python3-osprofiler BuildRequires: python3-stevedore BuildRequires: python3-requests BuildRequires: python3-oslo-i18n @@ -87,48 +103,53 @@ BuildRequires: python3-prettytable Requires: python3-babel Requires: python3-cryptography Requires: python3-decorator -Requires: python3-keystoneauth1 >= 3.1.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.20.0 -Requires: python3-osc-lib >= 1.7.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-osc-lib >= 1.8.0 Requires: python3-os-client-config >= 1.28.0 Requires: python3-pbr Requires: python3-prettytable Requires: python3-six %description -n python3-%{pname} -This is a client library for Magnum built on the Magnum API. -It provides a Python API (the magnumclient module) and a -command-line tool (magnum). +%{common_desc} %endif %package -n python-%{pname}-doc Summary: python-magnumclient documentation -BuildRequires: python-sphinx -BuildRequires: python-openstackdocstheme -BuildRequires: python-os-client-config -#BuildRequires: python-decorator +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-os-client-config +BuildRequires: openstack-macros +%if 0%{?fedora} > 0 +BuildRequires: python2-decorator +%else +BuildRequires: python-decorator +%endif %description -n python-%{pname}-doc Documentation for python-magnumclient -%package -n python-%{pname}-tests +%package -n python2-%{pname}-tests Summary: Python-magnumclient test subpackage +%{?python_provide:%python_provide python2-%{pname}-tests} -Requires: python-%{pname} = %{version}-%{release} -Requires: python-oslo-utils -Requires: python-stevedore -Requires: python-requests -Requires: python-oslo-i18n -Requires: python-fixtures -Requires: python-mock -Requires: python-testtools -Requires: python-keystoneauth1 -Requires: python-prettytable +Requires: python2-%{pname} = %{version}-%{release} +Requires: python2-oslo-utils +Requires: python2-stevedore +Requires: python2-requests +Requires: python2-oslo-i18n +Requires: python2-fixtures +Requires: python2-mock +Requires: python2-testtools +Requires: python2-keystoneauth1 +Requires: python2-prettytable -%description -n python-%{pname}-tests -Python-magnumclient test subpackage +%description -n python2-%{pname}-tests +%{common_desc_tests} %if 0%{?with_python3} %package -n python3-%{pname}-tests @@ -146,34 +167,32 @@ Requires: python3-keystoneauth1 Requires: python3-prettytable %description -n python3-%{pname}-tests -Python-magnumclient test subpackage +%{common_desc_tests} %endif %prep %autosetup -n %{name}-%{upstream_version} -S git # let RPM handle deps -rm -rf {test-,}requirements.txt +%py_req_cleanup %build export PBR_VERSION=%{version} %py2_build +%py2_build_wheel %if 0%{?with_python3} %py3_build %endif # generate html docs -%{__python2} setup.py build_sphinx -b html +# (TODO) Re-add -W once https://review.openstack.org/#/c/554197 is in a +# tagged release +sphinx-build -b html doc/source doc/build/html # Fix hidden-file-or-dir warnings rm -rf doc/build/html/.{doctrees,buildinfo} -%py2_build_wheel - %install export PBR_VERSION=%{version} - -install -p -D -m 644 tools/magnum.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/magnum.bash_completion - %if 0%{?with_python3} %py3_install %if %{default_python} >= 3 @@ -182,20 +201,21 @@ mv %{buildroot}%{_bindir}/magnum ./magnum.py3 %endif %py2_install -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ %if 0%{?default_python} >= 3 mv magnum.py3 %{buildroot}%{_bindir}/magnum %endif -#%check +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +%check # tests are failing due to unicode not defined # we are skipping the test -#%{__python2} setup.py test || -#%if 0%{?with_python3} -#%{__python3} setup.py test || -#%endif +%{__python2} setup.py test || +%if 0%{?with_python3} +%{__python3} setup.py test || +%endif %files -n python2-%{pname} %doc README.rst @@ -206,7 +226,6 @@ mv magnum.py3 %{buildroot}%{_bindir}/magnum %endif %{python2_sitelib}/*.egg-info %exclude %{python2_sitelib}/%{pname}/tests -%{_sysconfdir}/bash_completion.d/magnum.bash_completion %if 0%{?with_python3} %files -n python3-%{pname} @@ -224,7 +243,7 @@ mv magnum.py3 %{buildroot}%{_bindir}/magnum %license LICENSE %doc doc/build/html -%files -n python-%{pname}-tests +%files -n python2-%{pname}-tests %{python2_sitelib}/%{pname}/tests %if 0%{?with_python3} @@ -242,6 +261,6 @@ Contains python wheels for %{name} /wheels/* %changelog -* Fri Aug 11 2017 Alfredo Moralejo 2.7.0-1 -- Update to 2.7.0 +* Thu Aug 09 2018 RDO 2.10.0-1 +- Update to 2.10.0 diff --git a/openstack/python-magnumclient/centos/python-magnumclient.spec.orig b/openstack/python-magnumclient/centos/python-magnumclient.spec.orig new file mode 100644 index 00000000..a20f9993 --- /dev/null +++ b/openstack/python-magnumclient/centos/python-magnumclient.spec.orig @@ -0,0 +1,250 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global sname python-magnumclient +%global pname magnumclient + +%if 0%{?fedora} >= 24 +%global with_python3 1 +%global default_python 3 +%else +%global default_python 2 +%endif + +%global common_desc \ +This is a client library for Magnum built on the Magnum API. \ +It provides a Python API (the magnumclient module) and a \ +command-line tool (magnum). + +%global common_desc_tests Python-magnumclient test subpackage + +Name: python-%{pname} +Version: 2.10.0 +Release: 1%{?dist} +Summary: Client library for Magnum API + +License: ASL 2.0 +URL: https://launchpad.net/python-magnumclient +Source0: https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz +BuildArch: noarch + +%description +%{common_desc} + +%package -n python2-%{pname} +Summary: Client library for Magnum API +%{?python_provide:%python_provide python2-%{pname}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +BuildRequires: git + +# test dependencies +BuildRequires: python2-oslo-utils +BuildRequires: python2-openstackclient +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-log +BuildRequires: python2-osprofiler +BuildRequires: python2-stevedore +BuildRequires: python2-requests +BuildRequires: python2-oslo-i18n +BuildRequires: python2-fixtures +BuildRequires: python2-mock +BuildRequires: python2-testtools +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-prettytable + +Requires: python2-babel +Requires: python2-cryptography +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-osc-lib >= 1.8.0 +Requires: python2-os-client-config >= 1.28.0 +Requires: python2-pbr +Requires: python2-prettytable +Requires: python2-six +%if 0%{?fedora} > 0 +Requires: python2-decorator +%else +Requires: python-decorator +%endif + +%description -n python2-%{pname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{pname} +Summary: Client library for Magnum API +%{?python_provide:%python_provide python3-%{pname}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr + +# test dependencies +BuildRequires: python3-oslo-utils +BuildRequires: python3-openstackclient +BuildRequires: python3-oslo-serialization +BuildRequires: python3-oslo-log +BuildRequires: python3-osprofiler +BuildRequires: python3-stevedore +BuildRequires: python3-requests +BuildRequires: python3-oslo-i18n +BuildRequires: python3-fixtures +BuildRequires: python3-mock +BuildRequires: python3-testtools +BuildRequires: python3-keystoneauth1 +BuildRequires: python3-prettytable + +Requires: python3-babel +Requires: python3-cryptography +Requires: python3-decorator +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-osc-lib >= 1.8.0 +Requires: python3-os-client-config >= 1.28.0 +Requires: python3-pbr +Requires: python3-prettytable +Requires: python3-six + +%description -n python3-%{pname} +%{common_desc} +%endif + +%package -n python-%{pname}-doc +Summary: python-magnumclient documentation +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-os-client-config +BuildRequires: openstack-macros +%if 0%{?fedora} > 0 +BuildRequires: python2-decorator +%else +BuildRequires: python-decorator +%endif + +%description -n python-%{pname}-doc +Documentation for python-magnumclient + +%package -n python2-%{pname}-tests +Summary: Python-magnumclient test subpackage +%{?python_provide:%python_provide python2-%{pname}-tests} + +Requires: python2-%{pname} = %{version}-%{release} +Requires: python2-oslo-utils +Requires: python2-stevedore +Requires: python2-requests +Requires: python2-oslo-i18n +Requires: python2-fixtures +Requires: python2-mock +Requires: python2-testtools +Requires: python2-keystoneauth1 +Requires: python2-prettytable + +%description -n python2-%{pname}-tests +%{common_desc_tests} + +%if 0%{?with_python3} +%package -n python3-%{pname}-tests +Summary: Python-magnumclient test subpackage + +Requires: python3-%{pname} = %{version}-%{release} +Requires: python3-oslo-utils +Requires: python3-stevedore +Requires: python3-requests +Requires: python3-oslo-i18n +Requires: python3-fixtures +Requires: python3-mock +Requires: python3-testtools +Requires: python3-keystoneauth1 +Requires: python3-prettytable + +%description -n python3-%{pname}-tests +%{common_desc_tests} +%endif + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# let RPM handle deps +%py_req_cleanup + +%build +%py2_build + +%if 0%{?with_python3} +%py3_build +%endif +# generate html docs +# (TODO) Re-add -W once https://review.openstack.org/#/c/554197 is in a +# tagged release +sphinx-build -b html doc/source doc/build/html +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.{doctrees,buildinfo} + +%install + +%if 0%{?with_python3} +%py3_install +%if %{default_python} >= 3 +mv %{buildroot}%{_bindir}/magnum ./magnum.py3 +%endif +%endif + +%py2_install + +%if 0%{?default_python} >= 3 +mv magnum.py3 %{buildroot}%{_bindir}/magnum +%endif + +%check +# tests are failing due to unicode not defined +# we are skipping the test +%{__python2} setup.py test || +%if 0%{?with_python3} +%{__python3} setup.py test || +%endif + +%files -n python2-%{pname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/%{pname} +%if 0%{?default_python} <= 2 +%{_bindir}/magnum +%endif +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/%{pname}/tests + +%if 0%{?with_python3} +%files -n python3-%{pname} +%doc README.rst +%license LICENSE +%if 0%{?default_python} >= 3 +%{_bindir}/magnum +%endif +%{python3_sitelib}/magnumclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/%{pname}/tests +%endif + +%files -n python-%{pname}-doc +%license LICENSE +%doc doc/build/html + +%files -n python2-%{pname}-tests +%{python2_sitelib}/%{pname}/tests + +%if 0%{?with_python3} +%files -n python3-%{pname}-tests +%{python3_sitelib}/%{pname}/tests +%endif + +%changelog +* Thu Aug 09 2018 RDO 2.10.0-1 +- Update to 2.10.0 + diff --git a/openstack/python-muranoclient/centos/build_srpm.data b/openstack/python-muranoclient/centos/build_srpm.data index fb1e0a9f..e84f2d00 100644 --- a/openstack/python-muranoclient/centos/build_srpm.data +++ b/openstack/python-muranoclient/centos/build_srpm.data @@ -1,5 +1,3 @@ TAR_NAME="python-muranoclient" SRC_DIR="$CGCS_BASE/git/python-muranoclient" - -TIS_BASE_SRCREV=9a31e6bd406b18b32a97bd11d0020426dd6ff318 -TIS_PATCH_VER=2 +TIS_PATCH_VER=0 diff --git a/openstack/python-muranoclient/centos/python-muranoclient.spec b/openstack/python-muranoclient/centos/python-muranoclient.spec index 050843aa..efd6ba8d 100644 --- a/openstack/python-muranoclient/centos/python-muranoclient.spec +++ b/openstack/python-muranoclient/centos/python-muranoclient.spec @@ -7,8 +7,12 @@ %{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global common_desc \ +Client library for Murano built on the Murano API. It provides a Python \ +API (the muranoclient module) and a command-line tool (murano). + Name: python-%{pypi_name} -Version: 0.14.0 +Version: 1.1.1 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Client library for OpenStack Murano API @@ -18,45 +22,46 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch -%description -Client library for Murano built on the Murano API. It provides a Python -API (the muranoclient module) and a command-line tool (murano). +BuildRequires: git +BuildRequires: openstack-macros +%description +%{common_desc} %package -n python2-%{pypi_name} -BuildRequires: git BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python2-pip +BuildRequires: python2-setuptools BuildRequires: python2-wheel -BuildRequires: python-pbr >= 2.0.0 +BuildRequires: python2-pbr >= 2.0.0 -Requires: python-babel >= 2.3.4 -Requires: python-glanceclient >= 1:2.8.0 -Requires: python-httplib2 >= 0.7.5 -Requires: python-iso8601 >= 0.1.11 -Requires: python-keystoneclient >= 1:3.8.0 -Requires: python-murano-pkg-check >= 0.3.0 -Requires: python-pbr >= 2.0.0 -Requires: python-prettytable >= 0.7 -Requires: python-requests >= 2.10.0 -Requires: python-six >= 1.9.0 -Requires: python-yaql >= 1.1.0 -Requires: python-osc-lib >= 1.7.0 -Requires: python-oslo-log >= 3.22.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: pyOpenSSL >= 0.14 +Requires: python2-babel >= 2.3.4 +Requires: python2-glanceclient >= 1:2.8.0 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-keystoneclient >= 1:3.8.0 +Requires: python2-murano-pkg-check >= 0.3.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable >= 0.7.2 +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-yaql >= 1.1.3 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pyOpenSSL >= 16.2.0 +%if 0%{?fedora} > 0 +Requires: python2-pyyaml >= 3.10 +%else Requires: PyYAML >= 3.10 +%endif Summary: Client library for OpenStack Murano API. %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} -Client library for Murano built on the Murano API. It provides a Python -API (the muranoclient module) and a command-line tool (murano). +%{common_desc} # Python3 package %if 0%{?with_python3} @@ -71,52 +76,44 @@ BuildRequires: python-tools Requires: python3-babel >= 2.3.4 Requires: python3-glanceclient >= 1:2.8.0 -Requires: python3-httplib2 >= 0.7.5 Requires: python3-iso8601 >= 0.1.11 Requires: python3-keystoneclient >= 1:3.8.0 Requires: python3-murano-pkg-check >= 0.3.0 Requires: python3-pbr >= 2.0.0 -Requires: python3-prettytable >= 0.7 -Requires: python3-requests >= 2.10.0 -Requires: python3-six >= 1.9.0 -Requires: python3-yaql >= 1.1.0 -Requires: python3-osc-lib >= 1.7.0 -Requires: python3-oslo-log >= 3.22.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.20.0 -Requires: python3-oslo-utils >= 3.18.0 -Requires: python3-pyOpenSSL >= 0.14 +Requires: python3-prettytable >= 0.7.2 +Requires: python3-requests >= 2.14.2 +Requires: python3-six >= 1.10.0 +Requires: python3-yaql >= 1.1.3 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-pyOpenSSL >= 16.2.0 Requires: python3-PyYAML >= 3.10 %description -n python3-%{pypi_name} -Client library for Murano built on the Murano API. It provides a Python -API (the muranoclient module) and a command-line tool (murano). +%{common_desc} %endif # Documentation package %package -n python-%{pypi_name}-doc Summary: Documentation for OpenStack Murano API Client -BuildRequires: python-sphinx -BuildRequires: python-openstackdocstheme +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme %description -n python-%{pypi_name}-doc Documentation for the client library for interacting with Openstack Murano API. -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package - %prep %autosetup -n %{name}-%{upstream_version} -S git # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Let RPM handle the dependencies -rm -f test-requirements.txt requirements.txt +%py_req_cleanup %if 0%{?with_python3} rm -rf %{py3dir} @@ -127,6 +124,7 @@ cp -a . %{py3dir} %build export PBR_VERSION=%{version} %{__python2} setup.py build +%py2_build_wheel %if 0%{?with_python3} pushd %{py3dir} @@ -135,12 +133,11 @@ popd %endif # generate html docs -%{__python2} setup.py build_sphinx -b html +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} -%py2_build_wheel - %install export PBR_VERSION=%{version} %if 0%{?with_python3} @@ -151,10 +148,6 @@ popd %endif %{__python2} setup.py install --skip-build --root %{buildroot} -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - -install -p -D -m 644 tools/murano.bash_completion %{buildroot}%{_sysconfdir}/bash_completion.d/murano.bash_completion # rename binaries, make compat symlinks pushd %{buildroot}%{_bindir} @@ -165,17 +158,20 @@ done %endif popd +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + # prep SDK package mkdir -p %{buildroot}/usr/share/remote-clients tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/python_%{pypi_name}-*-py?.?.egg-info %{_bindir}/murano* -%{_sysconfdir}/bash_completion.d/murano.bash_completion # Files for python3 %if 0%{?with_python3} @@ -192,6 +188,12 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude=' %doc doc/build/html %license LICENSE +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + %files sdk /usr/share/remote-clients/%{name}-%{version}.tgz @@ -204,7 +206,9 @@ Contains python wheels for %{name} %files wheels /wheels/* -%changelog -* Mon Aug 14 2017 Alfredo Moralejo 0.14.0-1 -- Update to 0.14.0 + + +%changelog +* Thu Aug 16 2018 RDO 1.1.1-1 +- Update to 1.1.1 diff --git a/openstack/python-muranoclient/centos/python-muranoclient.spec.orig b/openstack/python-muranoclient/centos/python-muranoclient.spec.orig new file mode 100644 index 00000000..7addcb9e --- /dev/null +++ b/openstack/python-muranoclient/centos/python-muranoclient.spec.orig @@ -0,0 +1,182 @@ +%global pypi_name muranoclient + +%if 0%{?fedora} +%global with_python3 0 +%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} +%endif + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global common_desc \ +Client library for Murano built on the Murano API. It provides a Python \ +API (the muranoclient module) and a command-line tool (murano). + +Name: python-%{pypi_name} +Version: 1.1.1 +Release: 1%{?dist} +Summary: Client library for OpenStack Murano API + +License: ASL 2.0 +URL: http://pypi.python.org/pypi/%{name} +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros + +%description +%{common_desc} + +%package -n python2-%{pypi_name} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr >= 2.0.0 + +Requires: python2-babel >= 2.3.4 +Requires: python2-glanceclient >= 1:2.8.0 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-keystoneclient >= 1:3.8.0 +Requires: python2-murano-pkg-check >= 0.3.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable >= 0.7.2 +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-yaql >= 1.1.3 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pyOpenSSL >= 16.2.0 +%if 0%{?fedora} > 0 +Requires: python2-pyyaml >= 3.10 +%else +Requires: PyYAML >= 3.10 +%endif + +Summary: Client library for OpenStack Murano API. +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} +%{common_desc} + +# Python3 package +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Support of EC2 API for OpenStack +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python-tools + +Requires: python3-babel >= 2.3.4 +Requires: python3-glanceclient >= 1:2.8.0 +Requires: python3-iso8601 >= 0.1.11 +Requires: python3-keystoneclient >= 1:3.8.0 +Requires: python3-murano-pkg-check >= 0.3.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-prettytable >= 0.7.2 +Requires: python3-requests >= 2.14.2 +Requires: python3-six >= 1.10.0 +Requires: python3-yaql >= 1.1.3 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-pyOpenSSL >= 16.2.0 +Requires: python3-PyYAML >= 3.10 + +%description -n python3-%{pypi_name} +%{common_desc} +%endif + +# Documentation package +%package -n python-%{pypi_name}-doc +Summary: Documentation for OpenStack Murano API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme + +%description -n python-%{pypi_name}-doc +Documentation for the client library for interacting with Openstack +Murano API. + +%prep +%autosetup -n %{name}-%{upstream_version} -S git +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info +# Let RPM handle the dependencies +%py_req_cleanup + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +2to3 --write --nobackups %{py3dir} +%endif + +%build +%{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py build +popd +%endif + +# generate html docs +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html +# remove the sphinx-build leftovers +rm -rf doc/build/html/.{doctrees,buildinfo} + +%install +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}%{_bindir}/murano %{buildroot}%{_bindir}/python3-murano +popd +%endif + +%{__python2} setup.py install --skip-build --root %{buildroot} + +# rename binaries, make compat symlinks +pushd %{buildroot}%{_bindir} +%if 0%{?with_python3} +for i in %{pypi_name}-{3,%{?python3_shortver}}; do + ln -s python3-%{pypi_name} $i +done +%endif +popd + +%files -n python2-%{pypi_name} +%license LICENSE +%doc README.rst +%{python2_sitelib}/%{pypi_name} +%{python2_sitelib}/python_%{pypi_name}-*-py?.?.egg-info +%{_bindir}/murano* + +# Files for python3 +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{_bindir}/python3-murano +%{_bindir}/murano* +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/python_%{pypi_name}-%{version}-py?.?.egg-info +%endif + +%files -n python-%{pypi_name}-doc +%doc doc/build/html +%license LICENSE + +%changelog +* Thu Aug 16 2018 RDO 1.1.1-1 +- Update to 1.1.1 + diff --git a/openstack/python-networking-sfc/centos/python-networking-sfc.spec b/openstack/python-networking-sfc/centos/python-networking-sfc.spec index a015d581..f83a118c 100644 --- a/openstack/python-networking-sfc/centos/python-networking-sfc.spec +++ b/openstack/python-networking-sfc/centos/python-networking-sfc.spec @@ -1,5 +1,7 @@ %global pypi_name networking-sfc %global module networking_sfc +%global with_doc 0 + %{!?upstream_version: %global upstream_version %{version}%{?milestone}} Name: python-%{pypi_name} @@ -91,10 +93,12 @@ implemented as a collection of physical network devices connected in series by cables. +%if 0%{?with_doc} %package -n python-%{pypi_name}-doc Summary: Documentation for networking-sfc %description -n python-%{pypi_name}-doc Documentation for networking-sfc +%endif %package -n python2-%{pypi_name}-tests Summary: Tests for networking-sfc @@ -133,9 +137,11 @@ rm -rf %{module}/tests/unit/cli %build export PBR_VERSION=%{version} %py2_build +%if 0%{?with_doc} %{__python2} setup.py build_sphinx -b html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} +%endif # generate the configuration file PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/networking-sfc.conf @@ -167,9 +173,11 @@ mv etc/networking-sfc.conf.sample %{buildroot}%{_sysconfdir}/neutron/conf.d/neut %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/conf.d/neutron-server/networking-sfc.conf %exclude %{python2_sitelib}/%{module}/tests +%if 0%{?with_doc} %files -n python-%{pypi_name}-doc %doc doc/build/html/* %license LICENSE +%endif %files -n python2-%{pypi_name}-tests %{python2_sitelib}/%{module}/tests diff --git a/openstack/python-neutronclient/centos/build_srpm.data b/openstack/python-neutronclient/centos/build_srpm.data index f5384f29..8d95970d 100644 --- a/openstack/python-neutronclient/centos/build_srpm.data +++ b/openstack/python-neutronclient/centos/build_srpm.data @@ -1,4 +1,3 @@ TAR_NAME=python-neutronclient SRC_DIR="$CGCS_BASE/git/python-neutronclient" -TIS_BASE_SRCREV=e145c4ef8a0e8390f0468df422a757760e77f823 -TIS_PATCH_VER=GITREVCOUNT +TIS_PATCH_VER=0 diff --git a/openstack/python-neutronclient/centos/python-neutronclient.spec b/openstack/python-neutronclient/centos/python-neutronclient.spec index c6bf26b0..e2eabe7a 100644 --- a/openstack/python-neutronclient/centos/python-neutronclient.spec +++ b/openstack/python-neutronclient/centos/python-neutronclient.spec @@ -6,55 +6,84 @@ %global with_python3 1 %endif +%global common_desc \ +Client library and command line utility for interacting with OpenStack \ +Neutron's API. + Name: python-neutronclient -Version: 6.5.0 +Version: 6.9.1 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python API and CLI for OpenStack Neutron License: ASL 2.0 -URL: http://launchpad.net/python-neutronclient/ -Source0: %{name}-%{version}.tar.gz +URL: http://launchpad.net/%{name}/ +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz BuildArch: noarch Obsoletes: python-%{sname}-tests <= 4.1.1-3 %description -Client library and command line utility for interacting with OpenStack -Neutron's API. +%{common_desc} %package -n python2-%{sname} Summary: Python API and CLI for OpenStack Neutron %{?python_provide:%python_provide python2-neutronclient} BuildRequires: git +BuildRequires: openstack-macros BuildRequires: python2-devel -BuildRequires: python-setuptools +BuildRequires: python2-setuptools BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-pbr +BuildRequires: python2-pbr +# Required for unit tests +BuildRequires: python2-osc-lib-tests +BuildRequires: python2-oslotest +BuildRequires: python2-testtools +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios -Requires: python-babel >= 2.3.4 -Requires: python-cliff >= 2.8.0 -Requires: python-dateutil -Requires: python-iso8601 >= 0.1.11 -Requires: python-netaddr >= 0.7.13 -Requires: python-os-client-config >= 1.28.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: python-pbr -Requires: python-requests >= 2.10.0 -Requires: python-simplejson >= 2.2.0 -Requires: python-six >= 1.9.0 -Requires: python-debtcollector >= 1.2.0 -Requires: python-osc-lib >= 1.7.0 -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-keystoneclient >= 1:3.8.0 +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-os-client-config >= 1.28.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-debtcollector >= 1.2.0 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-keystoneclient >= 1:3.8.0 +Requires: python2-cliff >= 2.8.0 +%if 0%{?fedora} > 0 +Requires: python2-netaddr >= 0.7.18 +Requires: python2-simplejson >= 3.5.1 +%else +Requires: python-netaddr >= 0.7.18 +Requires: python-simplejson >= 3.5.1 +%endif %description -n python2-%{sname} -Client library and command line utility for interacting with OpenStack -Neutron's API. +%{common_desc} + +%package -n python2-%{sname}-tests +Summary: Python API and CLI for OpenStack Neutron - Unit tests +%{?python_provide:%python_provide python2-%{sname}-tests} +Requires: python2-%{sname} == %{version}-%{release} +Requires: python2-osc-lib-tests +Requires: python2-oslotest +Requires: python2-testtools +Requires: python2-testrepository +Requires: python2-testscenarios + +%description -n python2-%{sname}-tests +%{common_desc} + +This package containts the unit tests. %if 0%{?with_python3} %package -n python3-%{sname} @@ -64,62 +93,73 @@ Summary: Python API and CLI for OpenStack Neutron BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pbr +# Required for unit tests +BuildRequires: python3-osc-lib-tests +BuildRequires: python3-oslotest +BuildRequires: python3-testrepository +BuildRequires: python3-testtools +BuildRequires: python3-testscenarios Requires: python3-babel >= 2.3.4 Requires: python3-cliff >= 2.8.0 Requires: python3-iso8601 >= 0.1.11 -Requires: python3-netaddr >= 0.7.13 +Requires: python3-netaddr >= 0.7.18 Requires: python3-os-client-config >= 1.28.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.20.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 Requires: python3-pbr -Requires: python3-requests >= 2.10.0 -Requires: python3-simplejson >= 2.2.0 -Requires: python3-six >= 1.9.0 +Requires: python3-requests >= 2.14.2 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 Requires: python3-debtcollector >= 1.2.0 -Requires: python3-osc-lib >= 1.7.0 -Requires: python3-keystoneauth1 >= 3.1.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-keystoneauth1 >= 3.4.0 Requires: python3-keystoneclient >= 1:3.8.0 %description -n python3-%{sname} -Client library and command line utility for interacting with OpenStack -Neutron's API. +%{common_desc} + + +%package -n python3-%{sname}-tests +Summary: Python API and CLI for OpenStack Neutron - Unit tests +%{?python_provide:%python_provide python3-%{sname}-tests} +Requires: python3-%{sname} == %{version}-%{release} +Requires: python3-osc-lib-tests +Requires: python3-oslotest +Requires: python3-testrepository +Requires: python3-testtools +Requires: python3-testscenarios + +%description -n python3-%{sname}-tests +%{common_desc} + +This package containts the unit tests. %endif %package doc Summary: Documentation for OpenStack Neutron API Client -BuildRequires: python-dateutil -BuildRequires: python-sphinx -BuildRequires: python-oslo-sphinx -BuildRequires: python-openstackdocstheme -BuildRequires: python-reno -BuildRequires: python-cliff -BuildRequires: python-keystoneauth1 -BuildRequires: python-keystoneclient -BuildRequires: python-os-client-config -BuildRequires: python-osc-lib -BuildRequires: python-oslo-serialization -BuildRequires: python-oslo-utils +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-reno +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-keystoneclient +BuildRequires: python2-os-client-config +BuildRequires: python2-osc-lib >= 1.10.0 +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-utils +BuildRequires: python2-cliff %description doc -Client library and command line utility for interacting with OpenStack -Neutron's API. - - -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package - +%{common_desc} %prep %autosetup -n %{name}-%{upstream_version} -S git # Let RPM handle the dependencies -rm -f test-requirements.txt requirements.txt +%py_req_cleanup %build export PBR_VERSION=%{version} @@ -129,47 +169,56 @@ export PBR_VERSION=%{version} %py3_build %endif +# Build HTML docs +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html + +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo + %install export PBR_VERSION=%{version} %if 0%{?with_python3} %py3_install mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python3_version} ln -s ./neutron-%{python3_version} %{buildroot}%{_bindir}/neutron-3 -# Delete tests -rm -fr %{buildroot}%{python3_sitelib}/neutronclient/tests %endif %py2_install -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python2_version} ln -s ./neutron-%{python2_version} %{buildroot}%{_bindir}/neutron-2 - ln -s ./neutron-2 %{buildroot}%{_bindir}/neutron -mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d -install -pm 644 tools/neutron.bash_completion \ - %{buildroot}%{_sysconfdir}/bash_completion.d/neutron +# STX: stage wheel files +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ -# Delete tests -rm -fr %{buildroot}%{python2_sitelib}/neutronclient/tests - -%{__python2} setup.py build_sphinx -b html - -# prep SDK package +# STX: prep SDK package mkdir -p %{buildroot}/usr/share/remote-clients/%{name} tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} +%check +# (TODO) Ignore unit tests results until https://bugs.launchpad.net/python-neutronclient/+bug/1783789 +# is fixed. +%{__python2} setup.py testr || true +%if 0%{?with_python3} +rm -rf .testrepository +%{__python3} setup.py testr || true +%endif + %files -n python2-%{sname} %doc README.rst %license LICENSE %{python2_sitelib}/neutronclient %{python2_sitelib}/*.egg-info -%{_sysconfdir}/bash_completion.d %{_bindir}/neutron %{_bindir}/neutron-2 %{_bindir}/neutron-%{python2_version} +%exclude %{python2_sitelib}/neutronclient/tests + +%files -n python2-%{sname}-tests +%{python2_sitelib}/neutronclient/tests %if 0%{?with_python3} %files -n python3-%{sname} @@ -177,15 +226,24 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --e %doc README.rst %{python3_sitelib}/%{sname} %{python3_sitelib}/*.egg-info -%{_sysconfdir}/bash_completion.d %{_bindir}/neutron-3 %{_bindir}/neutron-%{python3_version} +%exclude %{python3_sitelib}/neutronclient/tests + +%files -n python3-%{sname}-tests +%{python3_sitelib}/neutronclient/tests %endif %files doc %doc doc/build/html %license LICENSE +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + %files sdk /usr/share/remote-clients/%{name}/%{name}-%{version}.tgz @@ -198,7 +256,11 @@ Contains python wheels for %{name} %files wheels /wheels/* -%changelog -* Mon Aug 14 2017 Alfredo Moralejo 6.5.0-1 -- Update to 6.5.0 + +%changelog +* Thu Sep 20 2018 RDO 6.9.1-1 +- Update to 6.9.1 + +* Thu Aug 09 2018 RDO 6.9.0-1 +- Update to 6.9.0 diff --git a/openstack/python-neutronclient/centos/python-neutronclient.spec.orig b/openstack/python-neutronclient/centos/python-neutronclient.spec.orig new file mode 100644 index 00000000..d6eb7f51 --- /dev/null +++ b/openstack/python-neutronclient/centos/python-neutronclient.spec.orig @@ -0,0 +1,233 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname neutronclient + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +Client library and command line utility for interacting with OpenStack \ +Neutron's API. + +Name: python-neutronclient +Version: 6.9.1 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Neutron + +License: ASL 2.0 +URL: http://launchpad.net/%{name}/ +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +Obsoletes: python-%{sname}-tests <= 4.1.1-3 + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Neutron +%{?python_provide:%python_provide python2-neutronclient} + +BuildRequires: git +BuildRequires: openstack-macros +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +# Required for unit tests +BuildRequires: python2-osc-lib-tests +BuildRequires: python2-oslotest +BuildRequires: python2-testtools +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios + +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-os-client-config >= 1.28.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-log >= 3.36.0 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr +Requires: python2-requests >= 2.14.2 +Requires: python2-six >= 1.10.0 +Requires: python2-debtcollector >= 1.2.0 +Requires: python2-osc-lib >= 1.10.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-keystoneclient >= 1:3.8.0 +Requires: python2-cliff >= 2.8.0 +%if 0%{?fedora} > 0 +Requires: python2-netaddr >= 0.7.18 +Requires: python2-simplejson >= 3.5.1 +%else +Requires: python-netaddr >= 0.7.18 +Requires: python-simplejson >= 3.5.1 +%endif + +%description -n python2-%{sname} +%{common_desc} + +%package -n python2-%{sname}-tests +Summary: Python API and CLI for OpenStack Neutron - Unit tests +%{?python_provide:%python_provide python2-%{sname}-tests} +Requires: python2-%{sname} == %{version}-%{release} +Requires: python2-osc-lib-tests +Requires: python2-oslotest +Requires: python2-testtools +Requires: python2-testrepository +Requires: python2-testscenarios + +%description -n python2-%{sname}-tests +%{common_desc} + +This package containts the unit tests. + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Neutron +%{?python_provide:%python_provide python3-neutronclient} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +# Required for unit tests +BuildRequires: python3-osc-lib-tests +BuildRequires: python3-oslotest +BuildRequires: python3-testrepository +BuildRequires: python3-testtools +BuildRequires: python3-testscenarios + +Requires: python3-babel >= 2.3.4 +Requires: python3-cliff >= 2.8.0 +Requires: python3-iso8601 >= 0.1.11 +Requires: python3-netaddr >= 0.7.18 +Requires: python3-os-client-config >= 1.28.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-pbr +Requires: python3-requests >= 2.14.2 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 +Requires: python3-debtcollector >= 1.2.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keystoneclient >= 1:3.8.0 + +%description -n python3-%{sname} +%{common_desc} + + +%package -n python3-%{sname}-tests +Summary: Python API and CLI for OpenStack Neutron - Unit tests +%{?python_provide:%python_provide python3-%{sname}-tests} +Requires: python3-%{sname} == %{version}-%{release} +Requires: python3-osc-lib-tests +Requires: python3-oslotest +Requires: python3-testrepository +Requires: python3-testtools +Requires: python3-testscenarios + +%description -n python3-%{sname}-tests +%{common_desc} + +This package containts the unit tests. +%endif + +%package doc +Summary: Documentation for OpenStack Neutron API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-reno +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-keystoneclient +BuildRequires: python2-os-client-config +BuildRequires: python2-osc-lib +BuildRequires: python2-oslo-serialization +BuildRequires: python2-oslo-utils +BuildRequires: python2-cliff + +%description doc +%{common_desc} + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# Let RPM handle the dependencies +%py_req_cleanup + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +# Build HTML docs +export PYTHONPATH=. +sphinx-build -W -b html doc/source doc/build/html + +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python3_version} +ln -s ./neutron-%{python3_version} %{buildroot}%{_bindir}/neutron-3 +%endif + +%py2_install +mv %{buildroot}%{_bindir}/neutron %{buildroot}%{_bindir}/neutron-%{python2_version} +ln -s ./neutron-%{python2_version} %{buildroot}%{_bindir}/neutron-2 +ln -s ./neutron-2 %{buildroot}%{_bindir}/neutron + +%check +# (TODO) Ignore unit tests results until https://bugs.launchpad.net/python-neutronclient/+bug/1783789 +# is fixed. +%{__python2} setup.py testr || true +%if 0%{?with_python3} +rm -rf .testrepository +%{__python3} setup.py testr || true +%endif + +%files -n python2-%{sname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/neutronclient +%{python2_sitelib}/*.egg-info +%{_bindir}/neutron +%{_bindir}/neutron-2 +%{_bindir}/neutron-%{python2_version} +%exclude %{python2_sitelib}/neutronclient/tests + +%files -n python2-%{sname}-tests +%{python2_sitelib}/neutronclient/tests + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_bindir}/neutron-3 +%{_bindir}/neutron-%{python3_version} +%exclude %{python3_sitelib}/neutronclient/tests + +%files -n python3-%{sname}-tests +%{python3_sitelib}/neutronclient/tests +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%changelog +* Thu Sep 20 2018 RDO 6.9.1-1 +- Update to 6.9.1 + +* Thu Aug 09 2018 RDO 6.9.0-1 +- Update to 6.9.0 + diff --git a/openstack/python-novaclient/centos/build_srpm.data b/openstack/python-novaclient/centos/build_srpm.data index cde47bcf..b1c697d3 100644 --- a/openstack/python-novaclient/centos/build_srpm.data +++ b/openstack/python-novaclient/centos/build_srpm.data @@ -1,4 +1,3 @@ TAR_NAME=python-novaclient SRC_DIR=$CGCS_BASE/git/python-novaclient -TIS_BASE_SRCREV=a1c00740c5b709a7d2bc4289fa6e28eac7909b8f -TIS_PATCH_VER=GITREVCOUNT +TIS_PATCH_VER=0 diff --git a/openstack/python-novaclient/centos/python-novaclient.spec b/openstack/python-novaclient/centos/python-novaclient.spec index 95fac97b..38459011 100644 --- a/openstack/python-novaclient/centos/python-novaclient.spec +++ b/openstack/python-novaclient/centos/python-novaclient.spec @@ -1,54 +1,56 @@ %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global sname novaclient +%global with_doc 0 %if 0%{?fedora} %global with_python3 1 %endif +%global common_desc \ +This is a client for the OpenStack Nova API. There's a Python API (the \ +novaclient module), and a command-line script (nova). Each implements 100% of \ +the OpenStack Nova API. + Name: python-novaclient Epoch: 1 -Version: 9.1.1 +Version: 11.0.0 Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: Python API and CLI for OpenStack Nova License: ASL 2.0 -URL: https://launchpad.net/python-novaclient -Source0: %{name}-%{version}.tar.gz +URL: https://launchpad.net/%{name} +Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: git +BuildRequires: openstack-macros + %description -This is a client for the OpenStack Nova API. There's a Python API (the -novaclient module), and a command-line script (nova). Each implements 100% of -the OpenStack Nova API. +%{common_desc} %package -n python2-%{sname} Summary: Python API and CLI for OpenStack Nova %{?python_provide:%python_provide python2-novaclient} BuildRequires: python2-devel -BuildRequires: python-pbr -BuildRequires: git -BuildRequires: python-setuptools +BuildRequires: python2-pbr +BuildRequires: python2-setuptools BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-dateutil -Requires: python-babel >= 2.3.4 -Requires: python-iso8601 >= 0.1.11 -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-oslo-i18n >= 2.1.0 -Requires: python-oslo-serialization >= 1.10.0 -Requires: python-oslo-utils >= 3.20.0 -Requires: python-pbr >= 2.0.0 -Requires: python-prettytable >= 0.7.1 -Requires: python-requests -Requires: python-simplejson >= 2.2.0 -Requires: python-six >= 1.9.0 +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable >= 0.7.2 +Requires: python-simplejson >= 3.5.1 +Requires: python2-six >= 1.10.0 %description -n python2-%{sname} -This is a client for the OpenStack Nova API. There's a Python API (the -novaclient module), and a command-line script (nova). Each implements 100% of -the OpenStack Nova API. +%{common_desc} %if 0%{?with_python3} %package -n python3-%{sname} @@ -61,50 +63,42 @@ BuildRequires: python3-setuptools Requires: python3-babel >= 2.3.4 Requires: python3-iso8601 >= 0.1.11 -Requires: python3-keystoneauth1 >= 3.1.0 -Requires: python3-oslo-i18n >= 2.1.0 -Requires: python3-oslo-serialization >= 1.10.0 -Requires: python3-oslo-utils >= 3.20.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 Requires: python3-pbr >= 2.0.0 -Requires: python3-prettytable >= 0.7.1 -Requires: python3-requests -Requires: python3-simplejson >= 2.2.0 -Requires: python3-six >= 1.9.0 +Requires: python3-prettytable >= 0.7.2 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 %description -n python3-%{sname} -This is a client for the OpenStack Nova API. There's a Python API (the -novaclient module), and a command-line script (nova). Each implements 100% of -the OpenStack Nova API. +%{common_desc} %endif +%if 0%{?with_doc} %package doc Summary: Documentation for OpenStack Nova API Client -BuildRequires: python-sphinx -BuildRequires: python-openstackdocstheme -BuildRequires: python-oslo-utils -BuildRequires: python-keystoneauth1 -BuildRequires: python-oslo-serialization -BuildRequires: python-prettytable +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-oslo-utils +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-serialization +BuildRequires: python2-prettytable +BuildRequires: python2-sphinxcontrib-apidoc %description doc -This is a client for the OpenStack Nova API. There's a Python API (the -novaclient module), and a command-line script (nova). Each implements 100% of -the OpenStack Nova API. +%{common_desc} This package contains auto-generated documentation. - -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package +%endif %prep %autosetup -n %{name}-%{upstream_version} -S git # Let RPM handle the requirements -rm -f test-requirements.txt +%py_req_cleanup %build export PBR_VERSION=%{version} @@ -128,9 +122,6 @@ rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python2_version} ln -s ./nova-%{python2_version} %{buildroot}%{_bindir}/nova-2 -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - ln -s ./nova-2 %{buildroot}%{_bindir}/nova mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d @@ -140,25 +131,34 @@ install -pm 644 tools/nova.bash_completion \ # Delete tests rm -fr %{buildroot}%{python2_sitelib}/novaclient/tests +%if 0%{?with_doc} %{__python2} setup.py build_sphinx -b html -%{__python2} setup.py build_sphinx -b man - +# generate man page +sphinx-build -b man doc/source doc/build/man install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1 # Fix hidden-file-or-dir warnings rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo +%endif + + +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ # prep SDK package mkdir -p %{buildroot}/usr/share/remote-clients/%{name} tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + %files -n python2-%{sname} %license LICENSE %doc README.rst %{python2_sitelib}/%{sname} %{python2_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} %{_mandir}/man1/nova.1.gz +%endif %{_bindir}/nova %{_bindir}/nova-2 %{_bindir}/nova-%{python2_version} @@ -171,14 +171,24 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --e %{python3_sitelib}/%{sname} %{python3_sitelib}/*.egg-info %{_sysconfdir}/bash_completion.d +%if 0%{?with_doc} %{_mandir}/man1/nova.1.gz +%endif %{_bindir}/nova-3 %{_bindir}/nova-%{python3_version} %endif +%if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE +%endif + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package %files sdk /usr/share/remote-clients/%{name}/%{name}-%{version}.tgz @@ -192,10 +202,8 @@ Contains python wheels for %{name} %files wheels /wheels/* + %changelog -* Fri Oct 06 2017 rdo-trunk 1:9.1.1-1 -- Update to 9.1.1 - -* Mon Aug 14 2017 Alfredo Moralejo 1:9.1.0-1 -- Update to 9.1.0 +* Thu Aug 09 2018 RDO 1:11.0.0-1 +- Update to 11.0.0 diff --git a/openstack/python-novaclient/centos/python-novaclient.spec.orig b/openstack/python-novaclient/centos/python-novaclient.spec.orig new file mode 100644 index 00000000..e4955dd2 --- /dev/null +++ b/openstack/python-novaclient/centos/python-novaclient.spec.orig @@ -0,0 +1,164 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%global sname novaclient + +%if 0%{?fedora} +%global with_python3 1 +%endif + +%global common_desc \ +This is a client for the OpenStack Nova API. There's a Python API (the \ +novaclient module), and a command-line script (nova). Each implements 100% of \ +the OpenStack Nova API. + +Name: python-novaclient +Epoch: 1 +Version: 11.0.0 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Nova +License: ASL 2.0 +URL: https://launchpad.net/%{name} +Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros + +%description +%{common_desc} + +%package -n python2-%{sname} +Summary: Python API and CLI for OpenStack Nova +%{?python_provide:%python_provide python2-novaclient} + +BuildRequires: python2-devel +BuildRequires: python2-pbr +BuildRequires: python2-setuptools + +Requires: python2-babel >= 2.3.4 +Requires: python2-iso8601 >= 0.1.11 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-serialization >= 2.18.0 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-pbr >= 2.0.0 +Requires: python2-prettytable >= 0.7.2 +Requires: python-simplejson >= 3.5.1 +Requires: python2-six >= 1.10.0 + +%description -n python2-%{sname} +%{common_desc} + +%if 0%{?with_python3} +%package -n python3-%{sname} +Summary: Python API and CLI for OpenStack Nova +%{?python_provide:%python_provide python3-novaclient} + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools + +Requires: python3-babel >= 2.3.4 +Requires: python3-iso8601 >= 0.1.11 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-prettytable >= 0.7.2 +Requires: python3-simplejson >= 3.5.1 +Requires: python3-six >= 1.10.0 + +%description -n python3-%{sname} +%{common_desc} +%endif + +%package doc +Summary: Documentation for OpenStack Nova API Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-oslo-utils +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-oslo-serialization +BuildRequires: python2-prettytable + +%description doc +%{common_desc} + +This package contains auto-generated documentation. + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# Let RPM handle the requirements +%py_req_cleanup + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python3_version} +ln -s ./nova-%{python3_version} %{buildroot}%{_bindir}/nova-3 +# Delete tests +rm -fr %{buildroot}%{python3_sitelib}/novaclient/tests +%endif + +%py2_install +mv %{buildroot}%{_bindir}/nova %{buildroot}%{_bindir}/nova-%{python2_version} +ln -s ./nova-%{python2_version} %{buildroot}%{_bindir}/nova-2 + +ln -s ./nova-2 %{buildroot}%{_bindir}/nova + +mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d +install -pm 644 tools/nova.bash_completion \ + %{buildroot}%{_sysconfdir}/bash_completion.d/nova + +# Delete tests +rm -fr %{buildroot}%{python2_sitelib}/novaclient/tests + +%{__python2} setup.py build_sphinx -b html +%{__python2} setup.py build_sphinx -b man + +install -p -D -m 644 doc/build/man/nova.1 %{buildroot}%{_mandir}/man1/nova.1 + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo + +%files -n python2-%{sname} +%license LICENSE +%doc README.rst +%{python2_sitelib}/%{sname} +%{python2_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/nova.1.gz +%{_bindir}/nova +%{_bindir}/nova-2 +%{_bindir}/nova-%{python2_version} + + +%if 0%{?with_python3} +%files -n python3-%{sname} +%license LICENSE +%doc README.rst +%{python3_sitelib}/%{sname} +%{python3_sitelib}/*.egg-info +%{_sysconfdir}/bash_completion.d +%{_mandir}/man1/nova.1.gz +%{_bindir}/nova-3 +%{_bindir}/nova-%{python3_version} +%endif + +%files doc +%doc doc/build/html +%license LICENSE + +%changelog +* Thu Aug 09 2018 RDO 1:11.0.0-1 +- Update to 11.0.0 + diff --git a/openstack/python-openstackclient/centos/build_srpm.data b/openstack/python-openstackclient/centos/build_srpm.data index c1f01e47..9e5c078e 100644 --- a/openstack/python-openstackclient/centos/build_srpm.data +++ b/openstack/python-openstackclient/centos/build_srpm.data @@ -1 +1,3 @@ -TIS_PATCH_VER=18 +TAR_NAME=python-openstackclient +SRC_DIR="$CGCS_BASE/git/python-openstackclient" +TIS_PATCH_VER=0 diff --git a/openstack/python-openstackclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/openstack/python-openstackclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch deleted file mode 100644 index fb48c0b6..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 62817fd..2c25c75 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -10,7 +10,7 @@ - - Name: python-openstackclient - Version: 3.12.0 --Release: 1%{?dist} -+Release: 2.el7%{?_tis_dist}.%{tis_patch_ver} - Summary: OpenStack Command-line Client - - License: ASL 2.0 diff --git a/openstack/python-openstackclient/centos/meta_patches/0002-spec-remote-clients-sdk.patch b/openstack/python-openstackclient/centos/meta_patches/0002-spec-remote-clients-sdk.patch deleted file mode 100644 index f7f9d5e5..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0002-spec-remote-clients-sdk.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 2c25c75..874e8a4 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -162,6 +162,13 @@ It is a thin wrapper to the stock python-*client modules that implement the - actual REST API client actions. - %endif - -+%package sdk -+Summary: SDK files for %{name} -+ -+%description sdk -+Contains SDK files for %{name} package -+ -+ - %prep - %autosetup -n %{name}-%{upstream_version} -S git - -@@ -206,6 +213,12 @@ mv %{buildroot}%{python2_sitelib}/openstackclient/locale %{buildroot}%{_datadir} - rm -rf %{buildroot}%{python3_sitelib}/openstackclient/locale - %endif - -+ -+# prep SDK package -+mkdir -p %{buildroot}/usr/share/remote-clients/%{name} -+tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} -+ -+ - # Find language files - %find_lang openstackclient --all-name - -@@ -242,6 +255,10 @@ rm -rf .testrepository - %{python3_sitelib}/openstackclient - %{python3_sitelib}/*.egg-info - %endif -+ -+%files sdk -+/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz -+ - %changelog - * Mon Aug 21 2017 Alfredo Moralejo 3.12.0-1 - - Update to 3.12.0 diff --git a/openstack/python-openstackclient/centos/meta_patches/0003-meta-dont-remove-requirements-txt.patch b/openstack/python-openstackclient/centos/meta_patches/0003-meta-dont-remove-requirements-txt.patch deleted file mode 100644 index a2ab1217..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0003-meta-dont-remove-requirements-txt.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 874e8a4..8cea3b8 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -173,7 +173,7 @@ Contains SDK files for %{name} package - %autosetup -n %{name}-%{upstream_version} -S git - - # We handle requirements ourselves, pkg_resources only bring pain --rm -rf requirements.txt test-requirements.txt -+rm -rf test-requirements.txt - - %build - %py2_build diff --git a/openstack/python-openstackclient/centos/meta_patches/0004-added-missing-build-require-dateutil.patch b/openstack/python-openstackclient/centos/meta_patches/0004-added-missing-build-require-dateutil.patch deleted file mode 100644 index 1ba5a430..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0004-added-missing-build-require-dateutil.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 8cea3b8..dbb1daa 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -59,6 +59,7 @@ BuildRequires: python-reno - BuildRequires: python-requestsexceptions - BuildRequires: python-openstacksdk - BuildRequires: python-osprofiler -+BuildRequires: python-dateutil - - Requires: python-pbr - Requires: python-babel diff --git a/openstack/python-openstackclient/centos/meta_patches/0005-meta-patch-for-neutron-extensions.patch b/openstack/python-openstackclient/centos/meta_patches/0005-meta-patch-for-neutron-extensions.patch deleted file mode 100644 index d248296f..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0005-meta-patch-for-neutron-extensions.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index dbb1daa..3ef7f0d 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -17,6 +17,9 @@ License: ASL 2.0 - URL: http://github.com/openstack/%{name} - Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz - -+# WRS patches -+Patch0001: 0001-neutron-extensions.patch -+ - BuildArch: noarch - - %description diff --git a/openstack/python-openstackclient/centos/meta_patches/0006-openstackClient_Passwordchange_warning.patch b/openstack/python-openstackclient/centos/meta_patches/0006-openstackClient_Passwordchange_warning.patch deleted file mode 100644 index fc3f3b25..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0006-openstackClient_Passwordchange_warning.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 3ef7f0d..9f624f1 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -19,6 +19,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_vers - - # WRS patches - Patch0001: 0001-neutron-extensions.patch -+Patch0002: openstackClient_Passwordchange_warning.patch - - BuildArch: noarch - diff --git a/openstack/python-openstackclient/centos/meta_patches/0007-CGTS-7814-warning-only-when-the-admin-password-chang.patch b/openstack/python-openstackclient/centos/meta_patches/0007-CGTS-7814-warning-only-when-the-admin-password-chang.patch deleted file mode 100644 index d054e184..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0007-CGTS-7814-warning-only-when-the-admin-password-chang.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 9f624f1..4791547 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -20,6 +20,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_vers - # WRS patches - Patch0001: 0001-neutron-extensions.patch - Patch0002: openstackClient_Passwordchange_warning.patch -+Patch0003: CGTS-7814-warning-only-when-the-admin-password-chang.patch - - BuildArch: noarch - diff --git a/openstack/python-openstackclient/centos/meta_patches/0008-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch b/openstack/python-openstackclient/centos/meta_patches/0008-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch deleted file mode 100644 index 539cbbbd..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/0008-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch +++ /dev/null @@ -1,25 +0,0 @@ -From bf24d1a99d29ab66feb4b2c7c7e5839e1cc23ec3 Mon Sep 17 00:00:00 2001 -From: Andy Ning -Date: Thu, 2 Nov 2017 10:45:40 -0400 -Subject: CGTS-7947: add --os-keystone-region-name to identity client - -Signed-off-by: Andy Ning ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 4791547..5d3d7b4 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -21,6 +21,7 @@ Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_vers - Patch0001: 0001-neutron-extensions.patch - Patch0002: openstackClient_Passwordchange_warning.patch - Patch0003: CGTS-7814-warning-only-when-the-admin-password-chang.patch -+Patch0004: 0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch - - BuildArch: noarch - --- -2.7.4 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1000-remove-version-requirements.patch b/openstack/python-openstackclient/centos/meta_patches/1000-remove-version-requirements.patch deleted file mode 100644 index d60d7361..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1000-remove-version-requirements.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 5d3d7b4..44dd46b 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -70,17 +70,17 @@ BuildRequires: python-dateutil - Requires: python-pbr - Requires: python-babel - Requires: python-cliff --Requires: python-openstacksdk >= 0.9.17 --Requires: python-oslo-i18n >= 2.1.0 --Requires: python-oslo-utils >= 3.20.0 --Requires: python-glanceclient >= 1:2.8.0 --Requires: python-keystoneauth1 >= 3.1.0 --Requires: python-keystoneclient >= 1:3.8.0 --Requires: python-novaclient >= 1:9.0.0 --Requires: python-cinderclient >= 3.1.0 --Requires: python-neutronclient >= 6.3.0 --Requires: python-six >= 1.9.0 --Requires: python-osc-lib >= 1.7.0 -+Requires: python-openstacksdk -+Requires: python-oslo-i18n -+Requires: python-oslo-utils -+Requires: python-glanceclient -+Requires: python-keystoneauth1 -+Requires: python-keystoneclient -+Requires: python-novaclient -+Requires: python-cinderclient -+Requires: python-neutronclient -+Requires: python-six -+Requires: python-osc-lib - Requires: python-%{client}-lang = %{version}-%{release} - - diff --git a/openstack/python-openstackclient/centos/meta_patches/1001-Turn-off-openstackclient-check.patch b/openstack/python-openstackclient/centos/meta_patches/1001-Turn-off-openstackclient-check.patch deleted file mode 100644 index 9259f160..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1001-Turn-off-openstackclient-check.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 18d4d4009e230d6d0b820496d210641ab79802af Mon Sep 17 00:00:00 2001 -From: Al Bailey -Date: Thu, 19 Oct 2017 14:19:56 -0500 -Subject: Turn off openstackclient check - ---- - SPECS/python-openstackclient.spec | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 44dd46b..9bca398 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -229,12 +229,13 @@ tar zcf %{buildroot}/usr/share/remote-clients/%{name}/%{name}-%{version}.tgz --e - # Find language files - %find_lang openstackclient --all-name - --%check --%{__python2} setup.py test --%if 0%{?with_python3} --rm -rf .testrepository --%{__python3} setup.py test --%endif -+# WRS disable check. -+#%check -+#%{__python2} setup.py test -+#%if 0%{?with_python3} -+#rm -rf .testrepository -+#%{__python3} setup.py test -+#%endif - - %files -n python2-%{client} - %license LICENSE --- -2.7.4 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1002-meta-us101470.patch b/openstack/python-openstackclient/centos/meta_patches/1002-meta-us101470.patch deleted file mode 100644 index b2f3cd4a..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1002-meta-us101470.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 47de75f37476e81f627222417e652ac77b2a17ab Mon Sep 17 00:00:00 2001 -From: Sen Yang -Date: Wed, 20 Dec 2017 23:53:02 -0500 -Subject: [PATCH 1/1] meta us101470 - ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 9bca398..3e184a9 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -22,6 +22,7 @@ Patch0001: 0001-neutron-extensions.patch - Patch0002: openstackClient_Passwordchange_warning.patch - Patch0003: CGTS-7814-warning-only-when-the-admin-password-chang.patch - Patch0004: 0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch -+Patch0005: 0001-US101470-Openstackclient-implementation-of-novaclien.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1003-meta-us101470.patch b/openstack/python-openstackclient/centos/meta_patches/1003-meta-us101470.patch deleted file mode 100644 index 31974e51..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1003-meta-us101470.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c330094f36df9e38c497d6cbfb03574e6ad368a0 Mon Sep 17 00:00:00 2001 -From: Sen Yang -Date: Fri, 5 Jan 2018 15:25:06 -0500 -Subject: [PATCH 1/1] US101470 part2 - ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 3e184a9..1cf210a 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -23,6 +23,7 @@ Patch0002: openstackClient_Passwordchange_warning.patch - Patch0003: CGTS-7814-warning-only-when-the-admin-password-chang.patch - Patch0004: 0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch - Patch0005: 0001-US101470-Openstackclient-implementation-of-novaclien.patch -+Patch0006: 0002-US101470-Openstackclient-implementation-of-novaclien.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1004-meta-US106901-Openstack-CLI-Adoption.patch b/openstack/python-openstackclient/centos/meta_patches/1004-meta-US106901-Openstack-CLI-Adoption.patch deleted file mode 100644 index fba542e5..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1004-meta-US106901-Openstack-CLI-Adoption.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 12504bfa15db581d310f3e059b5c8dce0df1be9f Mon Sep 17 00:00:00 2001 -From: Sen Yang -Date: Thu, 1 Feb 2018 12:05:55 -0500 -Subject: [PATCH 1/1] US106901 Openstack-CLI-Adoption for - Glance/Cinder/Ceilometer - ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 1cf210a..6774444 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -24,6 +24,7 @@ Patch0003: CGTS-7814-warning-only-when-the-admin-password-chang.patch - Patch0004: 0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch - Patch0005: 0001-US101470-Openstackclient-implementation-of-novaclien.patch - Patch0006: 0002-US101470-Openstackclient-implementation-of-novaclien.patch -+Patch0007: 0001-US106901-Openstack-CLI-Adoption.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1005-meta-US106901-Openstack-CLI-Adoption.patch b/openstack/python-openstackclient/centos/meta_patches/1005-meta-US106901-Openstack-CLI-Adoption.patch deleted file mode 100644 index 2ea5be5d..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1005-meta-US106901-Openstack-CLI-Adoption.patch +++ /dev/null @@ -1,25 +0,0 @@ -From ddf5ea208a3ba122558e355fe8535bcba024d2c8 Mon Sep 17 00:00:00 2001 -From: Sen Yang -Date: Mon, 5 Feb 2018 15:37:29 -0500 -Subject: [PATCH 1/1] US106901 Openstack CLI Adoption: Cinder/Glance/Ceilometer - - CI part2 ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 6774444..4b1682e 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -25,6 +25,7 @@ Patch0004: 0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patc - Patch0005: 0001-US101470-Openstackclient-implementation-of-novaclien.patch - Patch0006: 0002-US101470-Openstackclient-implementation-of-novaclien.patch - Patch0007: 0001-US106901-Openstack-CLI-Adoption.patch -+Patch0008: 0002-US106901-Openstack-CLI-Adoption.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1006-meta-patch-for-endpoint-groups.patch b/openstack/python-openstackclient/centos/meta_patches/1006-meta-patch-for-endpoint-groups.patch deleted file mode 100644 index a57a060d..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1006-meta-patch-for-endpoint-groups.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ac2faa010188a6d824a8958c2971bcefe2a56ab9 Mon Sep 17 00:00:00 2001 -From: Angie Wang -Date: Fri, 8 Jun 2018 16:05:52 -0400 -Subject: [PATCH] meta patch for endpoint groups - ---- - SPECS/python-openstackclient.spec | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 4b1682e..c192b2b 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -26,6 +26,9 @@ Patch0005: 0001-US101470-Openstackclient-implementation-of-novaclien.patc - Patch0006: 0002-US101470-Openstackclient-implementation-of-novaclien.patch - Patch0007: 0001-US106901-Openstack-CLI-Adoption.patch - Patch0008: 0002-US106901-Openstack-CLI-Adoption.patch -+Patch0009: 0001-Optimize-getting-endpoint-list.patch -+Patch0010: 0002-Add-support-for-endpoing-filter-commands.patch -+Patch0011: 0003-Add-support-for-endpoint-group-commands.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/1007-Allow-setting-wrs-binding-vif_model-using-osclient.patch b/openstack/python-openstackclient/centos/meta_patches/1007-Allow-setting-wrs-binding-vif_model-using-osclient.patch deleted file mode 100644 index 0c48f53e..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1007-Allow-setting-wrs-binding-vif_model-using-osclient.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 15a676bb74150546db8425ecae4976fb773661a0 Mon Sep 17 00:00:00 2001 -From: Joseph Richard -Date: Tue, 25 Sep 2018 14:57:06 -0400 -Subject: [PATCH 16/16] Allow setting wrs-binding:vif_model using osclient - ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index c192b2b..29fec53 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -29,6 +29,7 @@ Patch0008: 0002-US106901-Openstack-CLI-Adoption.patch - Patch0009: 0001-Optimize-getting-endpoint-list.patch - Patch0010: 0002-Add-support-for-endpoing-filter-commands.patch - Patch0011: 0003-Add-support-for-endpoint-group-commands.patch -+Patch0012: 0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch - - BuildArch: noarch - --- -1.8.3.1 diff --git a/openstack/python-openstackclient/centos/meta_patches/1008-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch b/openstack/python-openstackclient/centos/meta_patches/1008-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch deleted file mode 100644 index 5581becb..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/1008-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 6cf8ebc9e09035d49cfb051c4c4b03c4b8607ba3 Mon Sep 17 00:00:00 2001 -From: Teresa Ho -Date: Tue, 30 Oct 2018 11:16:53 -0400 -Subject: [PATCH] Remove wrs-binding:mac_filtering and setting extension - ---- - SPECS/python-openstackclient.spec | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/SPECS/python-openstackclient.spec b/SPECS/python-openstackclient.spec -index 29fec53..3dd52cb 100644 ---- a/SPECS/python-openstackclient.spec -+++ b/SPECS/python-openstackclient.spec -@@ -30,6 +30,7 @@ Patch0009: 0001-Optimize-getting-endpoint-list.patch - Patch0010: 0002-Add-support-for-endpoing-filter-commands.patch - Patch0011: 0003-Add-support-for-endpoint-group-commands.patch - Patch0012: 0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch -+Patch0013: 0001-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch - - BuildArch: noarch - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/meta_patches/PATCH_ORDER b/openstack/python-openstackclient/centos/meta_patches/PATCH_ORDER deleted file mode 100644 index 250eada2..00000000 --- a/openstack/python-openstackclient/centos/meta_patches/PATCH_ORDER +++ /dev/null @@ -1,17 +0,0 @@ -0001-Update-package-versioning-for-TIS-format.patch -0002-spec-remote-clients-sdk.patch -0003-meta-dont-remove-requirements-txt.patch -0004-added-missing-build-require-dateutil.patch -0005-meta-patch-for-neutron-extensions.patch -0006-openstackClient_Passwordchange_warning.patch -0007-CGTS-7814-warning-only-when-the-admin-password-chang.patch -0008-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch -1000-remove-version-requirements.patch -1001-Turn-off-openstackclient-check.patch -1002-meta-us101470.patch -1003-meta-us101470.patch -1004-meta-US106901-Openstack-CLI-Adoption.patch -1005-meta-US106901-Openstack-CLI-Adoption.patch -1006-meta-patch-for-endpoint-groups.patch -1007-Allow-setting-wrs-binding-vif_model-using-osclient.patch -1008-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch diff --git a/openstack/python-openstackclient/centos/patches/0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch b/openstack/python-openstackclient/centos/patches/0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch deleted file mode 100644 index ae4bc2e5..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-Allow-setting-wrs-binding-vif_model-using-osclient.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 405e39f8a77c7f33dda80b2681ff53407b2aa256 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Tue, 25 Sep 2018 14:53:18 -0400 -Subject: [PATCH] Allow setting wrs-binding:vif_model using osclient - ---- - openstackclient/network/v2/port.py | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py -index 4a29daf..22cba16 100644 ---- a/openstackclient/network/v2/port.py -+++ b/openstackclient/network/v2/port.py -@@ -389,6 +389,12 @@ class CreatePort(command.ShowOne): - "ip-address=[,mac-address=] " - "(repeat option to set multiple allowed-address pairs)") - ) -+ port_security.add_argument( -+ '--wrs-binding:vif_model', -+ dest='wrs_vif_model', -+ metavar='', -+ help=_("Set wrs-binding:vif_model for this port") -+ ) - _tag.add_tag_option_to_parser_for_create(parser, _('port')) - return parser - -@@ -421,6 +427,11 @@ class CreatePort(command.ShowOne): - if parsed_args.qos_policy: - attrs['qos_policy_id'] = client.find_qos_policy( - parsed_args.qos_policy, ignore_missing=False).id -+ -+ if parsed_args.wrs_vif_model: -+ attrs['wrs-binding:vif_model'] = parsed_args.wrs_vif_model -+ -+ - obj = client.create_port(**attrs) - # tags cannot be set when created, so tags need to be set later. - _tag.update_tags_for_set(client, obj, parsed_args) -@@ -705,6 +716,13 @@ class SetPort(command.Command): - "Unset it to None with the 'port unset' command " - "(requires data plane status extension)") - ) -+ port_security.add_argument( -+ '--wrs-binding:vif_model', -+ dest='wrs_vif_model', -+ metavar='', -+ help=_("Set wrs-binding:vif_model for this port") -+ ) -+ - _tag.add_tag_option_to_parser_for_set(parser, _('port')) - - return parser -@@ -762,6 +780,9 @@ class SetPort(command.Command): - if parsed_args.data_plane_status: - attrs['data_plane_status'] = parsed_args.data_plane_status - -+ if parsed_args.wrs_vif_model: -+ attrs['wrs-binding:vif_model'] = parsed_args.wrs_vif_model -+ - if attrs: - client.update_port(obj, **attrs) - --- -1.8.3.1 diff --git a/openstack/python-openstackclient/centos/patches/0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch b/openstack/python-openstackclient/centos/patches/0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch deleted file mode 100644 index d8a92ed1..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-CGTS-7947-add-os-keystone-region-name-to-identity-cl.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 54d7b55413d3374911957f6327ebd73f70ee24b8 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Thu, 2 Nov 2017 10:40:15 -0400 -Subject: [PATCH 1/1] CGTS-7947: add --os-keystone-region-name to identity - client - -Signed-off-by: rpm-build ---- - openstackclient/identity/client.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/openstackclient/identity/client.py b/openstackclient/identity/client.py -index 0292aac..e2f4756 100644 ---- a/openstackclient/identity/client.py -+++ b/openstackclient/identity/client.py -@@ -53,7 +53,7 @@ def make_client(instance): - - client = identity_client( - session=instance.session, -- region_name=instance.region_name, -+ region_name=instance.keystone_region_name, - **kwargs - ) - --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0001-Optimize-getting-endpoint-list.patch b/openstack/python-openstackclient/centos/patches/0001-Optimize-getting-endpoint-list.patch deleted file mode 100644 index 2d004cb3..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-Optimize-getting-endpoint-list.patch +++ /dev/null @@ -1,99 +0,0 @@ -From f6f5ce03c5b8a03180db24a02dda5b30f40b4cee Mon Sep 17 00:00:00 2001 -From: Anton Frolov -Date: Mon, 25 Sep 2017 12:31:24 -0700 -Subject: [PATCH] Optimize getting endpoint list - -Currently ListEndpoint.take_action method unconditionally iterates -over all endpoints and issue GET /v3/services/ -request for each endpoint. In case of HTTPS keystone endpoint this -can take significant amout of time, and it only getting worse in -case of multiple regions. - -This commit change this logic to making just two GET requests: first -it gets endpoint list, then it gets service list, searching service -in the list instead of issuing GET /v3/services/ request. - -Change-Id: I22b61c0b45b0205a2f5a4608c2473cb7814fe3cf -Closes-Bug: 1719413 ---- - openstackclient/identity/common.py | 10 ++++++++++ - openstackclient/identity/v3/endpoint.py | 3 ++- - openstackclient/tests/unit/identity/v3/test_endpoint.py | 2 ++ - releasenotes/notes/bug-1719413-0401d05c91cc9094.yaml | 8 ++++++++ - 4 files changed, 22 insertions(+), 1 deletion(-) - create mode 100644 releasenotes/notes/bug-1719413-0401d05c91cc9094.yaml - -diff --git a/openstackclient/identity/common.py b/openstackclient/identity/common.py -index 3dc5adb..e119f66 100644 ---- a/openstackclient/identity/common.py -+++ b/openstackclient/identity/common.py -@@ -26,6 +26,16 @@ from osc_lib import utils - from openstackclient.i18n import _ - - -+def find_service_in_list(service_list, service_id): -+ """Find a service by id in service list.""" -+ -+ for service in service_list: -+ if service.id == service_id: -+ return service -+ raise exceptions.CommandError( -+ "No service with a type, name or ID of '%s' exists." % service_id) -+ -+ - def find_service(identity_client, name_type_or_id): - """Find a service by id, name or type.""" - -diff --git a/openstackclient/identity/v3/endpoint.py b/openstackclient/identity/v3/endpoint.py -index 15760a1..3b4dd0d 100644 ---- a/openstackclient/identity/v3/endpoint.py -+++ b/openstackclient/identity/v3/endpoint.py -@@ -167,9 +167,10 @@ class ListEndpoint(command.Lister): - if parsed_args.region: - kwargs['region'] = parsed_args.region - data = identity_client.endpoints.list(**kwargs) -+ service_list = identity_client.services.list() - - for ep in data: -- service = common.find_service(identity_client, ep.service_id) -+ service = common.find_service_in_list(service_list, ep.service_id) - ep.service_name = get_service_name(service) - ep.service_type = service.type - return (columns, -diff --git a/openstackclient/tests/unit/identity/v3/test_endpoint.py b/openstackclient/tests/unit/identity/v3/test_endpoint.py -index 765fbed..fad53fc 100644 ---- a/openstackclient/tests/unit/identity/v3/test_endpoint.py -+++ b/openstackclient/tests/unit/identity/v3/test_endpoint.py -@@ -295,6 +295,7 @@ class TestEndpointList(TestEndpoint): - - # This is the return value for common.find_resource(service) - self.services_mock.get.return_value = self.service -+ self.services_mock.list.return_value = [self.service] - - # Get the command object to test - self.cmd = endpoint.ListEndpoint(self.app, None) -@@ -726,6 +727,7 @@ class TestEndpointListServiceWithoutName(TestEndpointList): - - # This is the return value for common.find_resource(service) - self.services_mock.get.return_value = self.service -+ self.services_mock.list.return_value = [self.service] - - # Get the command object to test - self.cmd = endpoint.ListEndpoint(self.app, None) -diff --git a/releasenotes/notes/bug-1719413-0401d05c91cc9094.yaml b/releasenotes/notes/bug-1719413-0401d05c91cc9094.yaml -new file mode 100644 -index 0000000..784d19e ---- /dev/null -+++ b/releasenotes/notes/bug-1719413-0401d05c91cc9094.yaml -@@ -0,0 +1,8 @@ -+--- -+fixes: -+ - | -+ Fix an issue with ``endpoint list`` working slow because it is issuing one GET -+ request to /v3/services/ Keystone API for each endpoint. In case of HTTPS -+ keystone endpoint and multiple regions it can take significant amount of time. -+ [Bug `1719413 `_] -+ --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0001-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch b/openstack/python-openstackclient/centos/patches/0001-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch deleted file mode 100644 index 32abb61d..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-Remove-wrs-binding-mac_filtering-and-setting-extensi.patch +++ /dev/null @@ -1,231 +0,0 @@ -From 2554505ca186f59b4dd51081565c1d6a8be50db7 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Tue, 30 Oct 2018 11:07:43 -0400 -Subject: [PATCH] Remove wrs-binding:mac_filtering and setting extension - ---- - openstackclient/network/v2/port.py | 1 - - openstackclient/network/v2/setting.py | 183 ---------------------------------- - setup.cfg | 4 - - 3 files changed, 188 deletions(-) - delete mode 100644 openstackclient/network/v2/setting.py - -diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py -index 22cba16..d158791 100644 ---- a/openstackclient/network/v2/port.py -+++ b/openstackclient/network/v2/port.py -@@ -64,7 +64,6 @@ def _get_columns(item): - 'tenant_id': 'project_id', - 'mtu': 'wrs-binding:mtu', - 'vif_model': 'wrs-binding:vif_model', -- 'mac_filtering': 'wrs-binding:mac_filtering', - } - return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) - -diff --git a/openstackclient/network/v2/setting.py b/openstackclient/network/v2/setting.py -deleted file mode 100644 -index 6be88dd..0000000 ---- a/openstackclient/network/v2/setting.py -+++ /dev/null -@@ -1,183 +0,0 @@ --# 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. --# --# Copyright (c) 2016 Wind River Systems, Inc. --# --# --# --# --# -- --"""Settings action implementations""" -- --from osc_lib.command import command --from osc_lib import exceptions --from osc_lib import utils --from openstackclient.i18n import _ --from openstackclient.identity import common as identity_common --from openstackclient.network import common --from openstackclient.network import sdk_utils -- --_formatters = {} -- -- --def _get_columns(item): -- column_map = {"id": "project_id"} -- invisible_columns = ["name"] -- return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map, -- invisible_columns) -- -- --def _get_attrs(client_manager, parsed_args): -- attrs = {key: parsed_args[key] for key in ["mac_filtering"] -- if key in parsed_args} -- -- if 'project' in parsed_args and parsed_args["project"] is not None: -- identity_client = client_manager.identity -- project_id = identity_common.find_project( -- identity_client, -- parsed_args["project"] -- ).id -- attrs['project_id'] = project_id -- -- return attrs -- -- --class ListSetting(common.NetworkAndComputeLister): -- """List settings of all projects who have non-default setting values""" -- -- def update_parser_common(self, parser): -- return parser -- -- def take_action_network(self, client, parsed_args): -- columns = ( -- 'mac_filtering', -- 'project_id' -- ) -- column_headers = ( -- 'Mac Filtering', -- 'Project ID' -- ) -- -- args = {} -- -- data = client.settings(**args) -- -- return (column_headers, -- (utils.get_item_properties( -- s, columns, -- formatters=_formatters, -- ) for s in data)) -- -- def take_action_compute(self, client, parsed_args): -- raise exceptions.CommandError("This command needs access to" -- " a network endpoint.") -- return -- -- --class ShowSetting(common.NetworkAndComputeShowOne): -- """Show settings of a given project""" -- -- def update_parser_common(self, parser): -- parser.add_argument( -- '--project', -- metavar='', -- help=_("Owner's project (name or ID)"), -- required=False -- ) -- return parser -- -- def take_action_network(self, client, parsed_args): -- client = self.app.client_manager.network -- # if no project id is specified, operate on current project -- args = _get_attrs(self.app.client_manager, vars(parsed_args)) -- if not "project_id" in args: -- args["project_id"] = client.find_tenant().project_id -- project_id = args["project_id"] -- -- obj = client.find_setting(project_id, ignore_missing=False) -- -- display_columns, columns = _get_columns(obj) -- data = utils.get_item_properties(obj, columns, formatters=_formatters) -- return (display_columns, data) -- -- def take_action_compute(self, client, parsed_args): -- raise exceptions.CommandError("This command needs access to" -- " a network endpoint.") -- return -- -- --# this one uses NetworkAndComputeCommand because settings can be deleted --# without a project id --class DeleteSetting(common.NetworkAndComputeCommand): -- """Delete setting""" -- -- def update_parser_common(self, parser): -- parser.add_argument( -- '--project', -- metavar='', -- help=_("Owner's project (name or ID)"), -- required=False -- ) -- return parser -- -- def take_action_network(self, client, parsed_args): -- client = self.app.client_manager.network -- # if no project id is specified, operate on current project -- args = _get_attrs(self.app.client_manager, vars(parsed_args)) -- if not "project_id" in args: -- args["project_id"] = client.find_tenant().project_id -- project_id = args["project_id"] -- -- client.delete_setting(project_id) -- return -- -- def take_action_compute(self, client, parsed_args): -- raise exceptions.CommandError("This command needs " -- "access to a network endpoint.") -- return -- -- --class UpdateSetting(command.Command): -- """Set setting properties""" -- -- def get_parser(self, prog_name): -- parser = super(UpdateSetting, self).get_parser(prog_name) -- parser.add_argument( -- '--project', -- metavar='', -- help=_("Owner's project (name or ID)"), -- required=False -- ) -- parser.add_argument('--mac-filtering', metavar='mac_filtering', -- help="Enable/Disable source MAC filtering" -- " on all ports", -- required=True) -- return parser -- -- def take_action(self, parsed_args): -- client = self.app.client_manager.network -- # if no project id is specified, operate on current project -- args = _get_attrs(self.app.client_manager, vars(parsed_args)) -- if not "project_id" in args: -- args["project_id"] = client.find_tenant().project_id -- project_id = args["project_id"] -- del args['project_id'] -- -- client.find_setting(project_id, ignore_missing=False) -- -- if args == {}: -- msg = "Nothing specified to be set" -- raise exceptions.CommandError(msg) -- -- client.update_setting(project_id, **args) -- return -diff --git a/setup.cfg b/setup.cfg -index d87b387..3e107bb 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -435,10 +435,6 @@ openstack.network.v2 = - portforwarding_create = openstackclient.network.v2.portforwarding:CreatePortforwarding - portforwarding_update = openstackclient.network.v2.portforwarding:UpdatePortforwarding - portforwarding_delete = openstackclient.network.v2.portforwarding:DeletePortforwarding -- setting_list = openstackclient.network.v2.setting:ListSetting -- setting_show = openstackclient.network.v2.setting:ShowSetting -- setting_update = openstackclient.network.v2.setting:UpdateSetting -- setting_delete = openstackclient.network.v2.setting:DeleteSetting - net_host_list = openstackclient.network.v2.host:ListHost - net_host_show = openstackclient.network.v2.host:ShowHost - net_host_create = openstackclient.network.v2.host:CreateHost --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0001-US101470-Openstackclient-implementation-of-novaclien.patch b/openstack/python-openstackclient/centos/patches/0001-US101470-Openstackclient-implementation-of-novaclien.patch deleted file mode 100644 index d1bd60fb..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-US101470-Openstackclient-implementation-of-novaclien.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 47122b746e16ffb3d35d14aa4f51f0f759400b71 Mon Sep 17 00:00:00 2001 -From: Sen Yang -Date: Mon, 18 Dec 2017 10:08:08 -0500 -Subject: [PATCH 1/1] US101470 Openstackclient implementation of novaclient cli - with wrs extension - - In this commit the following OSC equivalence of novaclient cli with - wrs extension is implemented: - openstack pcidevice list - nova device-list - openstack pcidevice show - nova device-show - openstack providernet pci show - nova providernet-show ---- - openstackclient/compute/v2/wrs_pci.py | 88 ++++++++++++++++++++++++ - openstackclient/compute/v2/wrs_providernets.py | 46 +++++++++++++ - python_openstackclient.egg-info/SOURCES.txt | 4 +- - python_openstackclient.egg-info/entry_points.txt | 3 + - setup.cfg | 3 + - 5 files changed, 143 insertions(+), 1 deletion(-) - create mode 100644 openstackclient/compute/v2/wrs_pci.py - create mode 100644 openstackclient/compute/v2/wrs_providernets.py - -diff --git a/openstackclient/compute/v2/wrs_pci.py b/openstackclient/compute/v2/wrs_pci.py -new file mode 100644 -index 0000000..c3fba81 ---- /dev/null -+++ b/openstackclient/compute/v2/wrs_pci.py -@@ -0,0 +1,88 @@ -+# 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. -+# -+# Copyright (c) 2015-2017 Wind River Systems, Inc. -+# -+# -+# -+# -+ -+ -+"""Compute v2 wrs_pci action implementations""" -+ -+from osc_lib.cli import parseractions -+from osc_lib.command import command -+from osc_lib import utils -+import six -+ -+from openstackclient.i18n import _ -+ -+ -+class ListPciDevices(command.Lister): -+ """List pci device""" -+ -+ def get_parser(self, prog_name): -+ parser = super(ListPciDevices, self).get_parser(prog_name) -+ parser.add_argument( -+ "--device", -+ metavar="", -+ help=_("PCI devices matching a particular device id or alias.") -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ compute_client = self.app.client_manager.compute -+ -+ columns = ( -+ "PCI Alias", -+ "Device Id", -+ "Vendor Id", -+ "Class Id", -+ "pci_pfs_configured", -+ "pci_pfs_used", -+ "pci_vfs_configured", -+ "pci_vfs_used" -+ ) -+ -+ data = compute_client.wrs_pci.list(parsed_args.device) -+ -+ return (columns, -+ (utils.get_item_properties( -+ s, columns, -+ ) for s in data)) -+ -+ -+class ShowPciDevices(command.ShowOne): -+ """Show details of a given PCI device.""" -+ -+ def get_parser(self, prog_name): -+ parser = super(ShowPciDevices, self).get_parser(prog_name) -+ parser.add_argument( -+ "device", -+ metavar="", -+ help=_("Device alias or device id of the PCI device.") -+ ) -+ parser.add_argument( -+ "--host", -+ metavar="", -+ help=_("Limit matches to PCI devices from a particular host") -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ compute_client = self.app.client_manager.compute -+ deviceInfo = compute_client.wrs_pci.get(parsed_args.device, -+ parsed_args.host) -+ -+ data = deviceInfo._info.copy() -+ return zip(*sorted(six.iteritems(data))) -+ -diff --git a/openstackclient/compute/v2/wrs_providernets.py b/openstackclient/compute/v2/wrs_providernets.py -new file mode 100644 -index 0000000..b487fb6 ---- /dev/null -+++ b/openstackclient/compute/v2/wrs_providernets.py -@@ -0,0 +1,46 @@ -+# 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. -+# -+# Copyright (c) 2015-2017 Wind River Systems, Inc. -+# -+# -+# -+# -+ -+ -+"""Compute v2 wrs_providernet action implementations""" -+ -+from osc_lib.cli import parseractions -+from osc_lib.command import command -+import six -+ -+from openstackclient.i18n import _ -+ -+ -+class ShowProvidernetPci(command.ShowOne): -+ """Show details of a given provider network""" -+ -+ def get_parser(self, prog_name): -+ parser = super(ShowProvidernetPci, self).get_parser(prog_name) -+ parser.add_argument( -+ "providernet", -+ metavar="", -+ help=_("Id of the provider network") -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ compute_client = self.app.client_manager.compute -+ -+ providernet = compute_client.wrs_providernets.get(parsed_args.providernet) -+ stats = providernet._info.copy() -+ return zip(*sorted(six.iteritems(stats))) -diff --git a/python_openstackclient.egg-info/SOURCES.txt b/python_openstackclient.egg-info/SOURCES.txt -index 82dae1c..66b9513 100644 ---- a/python_openstackclient.egg-info/SOURCES.txt -+++ b/python_openstackclient.egg-info/SOURCES.txt -@@ -187,6 +187,8 @@ openstackclient/compute/v2/server_group.py - openstackclient/compute/v2/server_image.py - openstackclient/compute/v2/service.py - openstackclient/compute/v2/usage.py -+openstackclient/compute/v2/wrs_pci.py -+openstackclient/compute/v2/wrs_providernets.py - openstackclient/identity/__init__.py - openstackclient/identity/client.py - openstackclient/identity/common.py -@@ -894,4 +896,4 @@ releasenotes/source/unreleased.rst - releasenotes/source/_static/.placeholder - releasenotes/source/_templates/.placeholder - tools/fast8.sh --tools/tox_install.sh -\ No newline at end of file -+tools/tox_install.sh -diff --git a/python_openstackclient.egg-info/entry_points.txt b/python_openstackclient.egg-info/entry_points.txt -index 99aaf5e..9a717b8 100644 ---- a/python_openstackclient.egg-info/entry_points.txt -+++ b/python_openstackclient.egg-info/entry_points.txt -@@ -45,6 +45,8 @@ compute_service_list = openstackclient.compute.v2.service:ListService - compute_service_set = openstackclient.compute.v2.service:SetService - console_log_show = openstackclient.compute.v2.console:ShowConsoleLog - console_url_show = openstackclient.compute.v2.console:ShowConsoleURL -+pcidevice_list = openstackclient.compute.v2.wrs_pci:ListPciDevices -+pcidevice_show = openstackclient.compute.v2.wrs_pci:ShowPciDevices - flavor_create = openstackclient.compute.v2.flavor:CreateFlavor - flavor_delete = openstackclient.compute.v2.flavor:DeleteFlavor - flavor_list = openstackclient.compute.v2.flavor:ListFlavor -@@ -65,6 +67,7 @@ keypair_create = openstackclient.compute.v2.keypair:CreateKeypair - keypair_delete = openstackclient.compute.v2.keypair:DeleteKeypair - keypair_list = openstackclient.compute.v2.keypair:ListKeypair - keypair_show = openstackclient.compute.v2.keypair:ShowKeypair -+providernet_pci_show = openstackclient.compute.v2.wrs_providernets:ShowProvidernetPci - server_add_fixed_ip = openstackclient.compute.v2.server:AddFixedIP - server_add_floating_ip = openstackclient.compute.v2.server:AddFloatingIP - server_add_port = openstackclient.compute.v2.server:AddPort -diff --git a/setup.cfg b/setup.cfg -index 1bff735..f162417 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -71,6 +71,8 @@ openstack.compute.v2 = - flavor_show = openstackclient.compute.v2.flavor:ShowFlavor - flavor_set = openstackclient.compute.v2.flavor:SetFlavor - flavor_unset = openstackclient.compute.v2.flavor:UnsetFlavor -+ pcidevice_list = openstackclient.compute.v2.wrs_pci:ListPciDevices -+ pcidevice_show = openstackclient.compute.v2.wrs_pci:ShowPciDevices - host_list = openstackclient.compute.v2.host:ListHost - host_set = openstackclient.compute.v2.host:SetHost - host_show = openstackclient.compute.v2.host:ShowHost -@@ -85,6 +87,7 @@ openstack.compute.v2 = - keypair_delete = openstackclient.compute.v2.keypair:DeleteKeypair - keypair_list = openstackclient.compute.v2.keypair:ListKeypair - keypair_show = openstackclient.compute.v2.keypair:ShowKeypair -+ providernet_pci_show = openstackclient.compute.v2.wrs_providernets:ShowProvidernetPci - server_add_fixed_ip = openstackclient.compute.v2.server:AddFixedIP - server_add_floating_ip = openstackclient.compute.v2.server:AddFloatingIP - server_add_port = openstackclient.compute.v2.server:AddPort --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0001-US106901-Openstack-CLI-Adoption.patch b/openstack/python-openstackclient/centos/patches/0001-US106901-Openstack-CLI-Adoption.patch deleted file mode 100644 index 72e144fc..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-US106901-Openstack-CLI-Adoption.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 9ab2fc77ed85aee4c6b63b0113e309136de419f0 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Thu, 1 Feb 2018 10:20:53 -0500 -Subject: [PATCH 1/1] US106901 Openstack CLI Adoption: - Neutron/Cinder/Glance/Ceilometer - - CI partI - OSC cli support of "--cache-raw" and "--wait" i - options for "nova image-create" ---- - openstackclient/image/v2/image.py | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - -diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py -index c2c5c59..f5d4acf 100644 ---- a/openstackclient/image/v2/image.py -+++ b/openstackclient/image/v2/image.py -@@ -12,6 +12,12 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# - - """Image V2 Action Implementations""" - -@@ -253,6 +259,25 @@ class CreateImage(command.ShowOne): - dest=deadopt.replace('-', '_'), - help=argparse.SUPPRESS, - ) -+ #WRS extension -+ parser.add_argument( -+ "--cache-raw", -+ default=False, -+ action="store_true", -+ help=_("Convert the image to RAW in the background" -+ " and store it for fast access."), -+ ) -+ #WRS extension -+ parser.add_argument( -+ "--wait", -+ metavar="", -+ nargs='?', -+ type=int, -+ default=None, -+ const=0, -+ help=_("Wait for the convertion of the image to RAW" -+ " to finish before returning the image."), -+ ) - return parser - - def take_action(self, parsed_args): -@@ -302,6 +327,9 @@ class CreateImage(command.ShowOne): - kwargs['visibility'] = 'community' - if parsed_args.shared: - kwargs['visibility'] = 'shared' -+ #WRS extension -+ if parsed_args.cache_raw: -+ kwargs['cache_raw'] = 'True' - # Handle deprecated --owner option - project_arg = parsed_args.project - if parsed_args.owner: -@@ -361,6 +389,11 @@ class CreateImage(command.ShowOne): - with fp: - try: - image_client.images.upload(image.id, fp) -+ #WRS extension -+ # If cache_raw and wait options were chosen, wait until -+ # image is cached. -+ if parsed_args.cache_raw is True and parsed_args.wait is not None: -+ gc_utils.wait_for_caching(parsed_args.wait, image_client, image.id) - except Exception: - # If the upload fails for some reason attempt to remove the - # dangling queued image made by the create() call above but --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0001-neutron-extensions.patch b/openstack/python-openstackclient/centos/patches/0001-neutron-extensions.patch deleted file mode 100644 index 3bcdae47..00000000 --- a/openstack/python-openstackclient/centos/patches/0001-neutron-extensions.patch +++ /dev/null @@ -1,1822 +0,0 @@ -commit bf6c3b52f676888203082e25e404ed5e9503648e -Author: rpm-build -Date: Mon Feb 12 12:11:43 2018 -0500 - - neutron extensions - -diff --git a/openstackclient/network/v2/host.py b/openstackclient/network/v2/host.py -new file mode 100644 -index 0000000..f9dab8b ---- /dev/null -+++ b/openstackclient/network/v2/host.py -@@ -0,0 +1,191 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Host action implementations""" -+ -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_showhost_formatters = { -+ 'agents': utils.format_list_of_dicts -+} -+ -+_listhost_formatters = { -+ 'agents': len -+} -+ -+ -+def _get_columns(item): -+ column_map = {} -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) -+ -+ -+def _get_attrs(client_manager, parsed_args): -+ attrs = {key: parsed_args[key] for key in ['availability', 'id', 'name'] -+ if key in parsed_args and parsed_args[key] is not None} -+ return attrs -+ -+ -+class ListHost(common.NetworkAndComputeLister): -+ """List host""" -+ -+ def update_parser_common(self, parser): -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'id', -+ 'name', -+ 'availability', -+ 'agents', -+ 'subnets', -+ 'routers', -+ 'ports' -+ ) -+ column_headers = ( -+ 'Id', -+ 'Name', -+ 'Availability', -+ 'Agents', -+ 'Subnets', -+ 'Routers', -+ 'Ports' -+ ) -+ -+ args = {} -+ -+ data = client.hosts(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_listhost_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class ShowHost(common.NetworkAndComputeShowOne): -+ """Show host details""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'host', -+ metavar="", -+ help=("ID or name of host to look up") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_host(parsed_args.host, ignore_missing=False) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, -+ formatters=_showhost_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class CreateHost(common.NetworkAndComputeShowOne): -+ """Create a host record""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument('--availability', metavar="availability", -+ help='Set host availability status to up or down', -+ required=False) -+ parser.add_argument('--id', metavar="id", -+ help='Create a new host record', -+ required=False) -+ parser.add_argument('name', metavar='NAME', -+ help='System hostname of given host') -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ # the neutron equivalent command defaults to availability=down -+ # when not specified -+ if "availability" not in attrs: -+ attrs['availability'] = "down" -+ -+ obj = client.create_host(**attrs) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, -+ formatters=_listhost_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class DeleteHost(common.NetworkAndComputeDelete): -+ """Delete host""" -+ -+ # Used by base class to find resources in parsed_args. -+ resource = 'name' -+ r = None -+ -+ def update_parser_common(self, parser): -+ parser.add_argument('name', metavar='NAME', nargs="+", -+ help='System hostname of given host') -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_host(self.r) -+ client.delete_host(obj) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class UpdateHost(command.Command): -+ """Set host properties""" -+ -+ def get_parser(self, prog_name): -+ parser = super(UpdateHost, self).get_parser(prog_name) -+ parser.add_argument('--availability', metavar="availability", -+ help='Set host availability status to up or down', -+ required=False) -+ parser.add_argument('host', metavar='HOST', -+ help='System hostname of given host') -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.network -+ obj = client.find_host(parsed_args.host, ignore_missing=False) -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ if attrs == {}: -+ msg = "Nothing specified to be set" -+ raise exceptions.CommandError(msg) -+ client.update_host(obj, **attrs) -+ return -diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py -index 9536fe8..4a29daf 100644 ---- a/openstackclient/network/v2/port.py -+++ b/openstackclient/network/v2/port.py -@@ -62,6 +62,9 @@ def _get_columns(item): - 'is_admin_state_up': 'admin_state_up', - 'is_port_security_enabled': 'port_security_enabled', - 'tenant_id': 'project_id', -+ 'mtu': 'wrs-binding:mtu', -+ 'vif_model': 'wrs-binding:vif_model', -+ 'mac_filtering': 'wrs-binding:mac_filtering', - } - return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) - -diff --git a/openstackclient/network/v2/portforwarding.py b/openstackclient/network/v2/portforwarding.py -new file mode 100644 -index 0000000..0f70e84 ---- /dev/null -+++ b/openstackclient/network/v2/portforwarding.py -@@ -0,0 +1,259 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Port forwarding action implementations""" -+ -+import argparse -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.i18n import _ -+from openstackclient.identity import common as identity_common -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_formatters = {} -+ -+ -+def _get_columns(item): -+ column_map = {} -+ invisible_columns = ["name"] -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map, -+ invisible_columns) -+ -+ -+def _get_attrs(client_manager, parsed_args): -+ attr_names = ['inside_addr', 'inside_port', 'outside_port', -+ 'protocol', 'description', 'router_id'] -+ attrs = {key: parsed_args[key] for key in attr_names -+ if key in parsed_args and parsed_args[key] is not None} -+ -+ if 'project' in parsed_args and parsed_args["project"] is not None: -+ identity_client = client_manager.identity -+ project_id = identity_common.find_project( -+ identity_client, -+ parsed_args["project"] -+ ).id -+ # TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor -+ attrs['tenant_id'] = project_id -+ attrs['project_id'] = project_id -+ -+ return attrs -+ -+ -+class ListPortforwarding(common.NetworkAndComputeLister): -+ """List portforwarding""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)") -+ ) -+ parser.add_argument( -+ '--router-id', -+ metavar='', -+ help=_("Router's ID") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'id', -+ 'router_id', -+ 'inside_addr', -+ 'inside_port', -+ 'outside_port', -+ 'protocol', -+ ) -+ column_headers = ( -+ 'ID', -+ 'Router ID', -+ 'Inside Address', -+ 'Inside Port', -+ 'Outside Port', -+ 'Protocol' -+ ) -+ -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ data = client.portforwardings(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class ShowPortforwarding(common.NetworkAndComputeShowOne): -+ """Show portforwarding details""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'portforwarding', -+ metavar="", -+ help=("Portforwarding to display (ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_portforwarding(parsed_args.portforwarding, -+ ignore_missing=False) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class CreatePortforwarding(common.NetworkAndComputeShowOne): -+ """Create new portforwarding""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--inside-addr', -+ help='Private IP address.') -+ parser.add_argument( -+ '--inside_addr', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--inside-port', -+ help='Private layer4 protocol port.') -+ parser.add_argument( -+ '--inside_port', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--outside-port', -+ help='Public layer4 protocol port.') -+ parser.add_argument( -+ '--outside_port', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--protocol', -+ help='Layer4 protocol port number.') -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)") -+ ) -+ identity_common.add_project_domain_option_to_parser(parser) -+ parser.add_argument( -+ '--description', -+ help='User specified text description') -+ parser.add_argument( -+ 'router_id', metavar='ROUTERID', -+ help='Router instance identifier.') -+ -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ router = client.find_router(attrs['router_id'], ignore_missing=False) -+ attrs['router_id'] = router.id -+ obj = client.create_portforwarding(**attrs) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class DeletePortforwarding(common.NetworkAndComputeDelete): -+ """Delete portforwarding""" -+ -+ # Used by base class to find resources in parsed_args. -+ resource = 'portforwarding' -+ r = None -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'portforwarding', -+ metavar="", -+ nargs="+", -+ help=("Portforwarding to delete (ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_portforwarding(self.r) -+ client.delete_portforwarding(obj) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class UpdatePortforwarding(command.Command): -+ """Set portforwarding properties""" -+ -+ def get_parser(self, prog_name): -+ parser = super(UpdatePortforwarding, self).get_parser(prog_name) -+ parser.add_argument( -+ '--inside-addr', -+ help='Private IP address.') -+ parser.add_argument( -+ '--inside_addr', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--inside-port', -+ help='Private layer4 protocol port.') -+ parser.add_argument( -+ '--inside_port', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--outside-port', -+ help='Public layer4 protocol port.') -+ parser.add_argument( -+ '--outside_port', -+ help=argparse.SUPPRESS) -+ parser.add_argument( -+ '--protocol', -+ help='Layer4 protocol port number.') -+ parser.add_argument( -+ '--description', -+ help='User specified text description') -+ parser.add_argument( -+ 'portforwarding', metavar='PORTFORWARDING', -+ help='Portforwarding to delete (ID)') -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.network -+ obj = client.find_portforwarding(parsed_args.portforwarding, -+ ignore_missing=False) -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ if attrs == {}: -+ msg = "Nothing specified to be set" -+ raise exceptions.CommandError(msg) -+ client.update_portforwarding(obj, **attrs) -+ return -diff --git a/openstackclient/network/v2/providernet.py b/openstackclient/network/v2/providernet.py -new file mode 100644 -index 0000000..635eb64 ---- /dev/null -+++ b/openstackclient/network/v2/providernet.py -@@ -0,0 +1,302 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Providernet action implementations""" -+ -+import argparse -+ -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+ -+def add_boolean_argument(parser, name, **kwargs): -+ for keyword in ('metavar', 'choices'): -+ kwargs.pop(keyword, None) -+ default = kwargs.pop('default', argparse.SUPPRESS) -+ parser.add_argument( -+ name, -+ metavar='{True,False}', -+ choices=['True', 'true', 'False', 'false'], -+ default=default, -+ **kwargs) -+ -+ -+def _format_ranges(item): -+ item = utils.format_list_of_dicts(item) -+ # we want to remove some fields -+ # to match the output to neutron providernet-list -+ separator = ', ' -+ item = item.split(separator) -+ item = [s for s in item if "name" in s or "maximum" in s or "minimum" in s] -+ -+ return separator.join(item) -+ -+# the providernet list command does not display some values in the ranges field -+_filtered_ranges_formatters = { -+ 'ranges': _format_ranges -+} -+ -+_formatters = { -+ 'ranges': utils.format_list_of_dicts -+} -+ -+_net_list_on_providernet_formatters = { -+ 'vxlan': utils.format_dict -+} -+ -+ -+def _get_columns(item): -+ column_map = {} -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) -+ -+ -+def _get_attrs(client_manager, parsed_args): -+ attrs = {key: parsed_args[key] for key in -+ ["name", "type", "vlan_transparent", "description", "mtu"] -+ if key in parsed_args} -+ if "mtu" in attrs and attrs["mtu"] is None: -+ del attrs["mtu"] -+ -+ return attrs -+ -+ -+class ListProvidernet(common.NetworkAndComputeLister): -+ """List providernets""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--type', -+ dest='type', -+ help='List all providernets of type') -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'id', -+ 'name', -+ 'type', -+ 'mtu', -+ 'ranges' -+ ) -+ column_headers = ( -+ 'ID', -+ 'Name', -+ 'Type', -+ 'MTU', -+ 'Ranges' -+ ) -+ -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ data = client.providernets(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_filtered_ranges_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class ShowProvidernet(common.NetworkAndComputeShowOne): -+ """Show providernet details""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'providernet', -+ metavar="", -+ help=("Providernet to display (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_providernet(parsed_args.providernet, -+ ignore_missing=False) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class CreateProvidernet(common.NetworkAndComputeShowOne): -+ """Create new providernet""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--description', -+ dest='description', -+ help='Set user-defined description field for a provider network') -+ parser.add_argument( -+ '--type', required=True, -+ dest='type', default='flat', -+ choices=['flat', 'vlan', 'vxlan'], -+ help='Set network type for a provider network') -+ parser.add_argument( -+ '--mtu', dest='mtu', type=int, -+ help='Maximum transmit unit on provider network') -+ add_boolean_argument( -+ parser, -+ '--vlan-transparent', -+ default='False', -+ help='Allow VLAN tagged packets on tenant networks') -+ parser.add_argument( -+ 'name', metavar='NAME', -+ help='Set user-defined name for a provider network') -+ -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ obj = client.create_providernet(**attrs) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class DeleteProvidernet(common.NetworkAndComputeDelete): -+ """Delete providernet""" -+ -+ # Used by base class to find resources in parsed_args. -+ resource = 'providernet' -+ r = None -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'providernet', -+ metavar="", -+ nargs="+", -+ help=("Providernet to delete (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_providernet(self.r) -+ client.delete_providernet(obj) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class UpdateProvidernet(command.Command): -+ """Set providernet properties""" -+ -+ def get_parser(self, prog_name): -+ parser = super(UpdateProvidernet, self).get_parser(prog_name) -+ parser.add_argument( -+ '--description', -+ dest='description', -+ help='Set user-defined description field for a provider network') -+ parser.add_argument( -+ '--mtu', dest='mtu', type=int, -+ help='Maximum transmit unit on provider network') -+ add_boolean_argument( -+ parser, -+ '--vlan-transparent', -+ help='Allow VLAN tagged packets on tenant networks') -+ parser.add_argument( -+ 'providernet', metavar='PROVIDERNET', -+ help='Set user-defined name for a provider network') -+ -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.network -+ -+ obj = client.find_providernet(parsed_args.providernet, -+ ignore_missing=False) -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ if attrs == {}: -+ msg = "Nothing specified to be set" -+ raise exceptions.CommandError(msg) -+ -+ client.update_providernet(obj, **attrs) -+ return -+ -+ -+class NetListOnProvidernet(common.NetworkAndComputeLister): -+ """List the networks on a provider network.""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'providernet', -+ metavar="", -+ help=("Providernet to display (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_providernet(parsed_args.providernet, -+ ignore_missing=False) -+ providernet_id = obj.id -+ -+ columns = ( -+ 'id', -+ 'name', -+ 'vlan_id', -+ 'providernet_type', -+ 'segmentation_id', -+ 'vxlan', -+ ) -+ column_headers = ( -+ 'ID', -+ 'Name', -+ 'VLAN ID', -+ 'Providernet Type', -+ 'Segmentation ID', -+ 'Providernet Attributes' -+ ) -+ -+ args = {} -+ -+ # cheated a bit here, doing the same request as a providernet list, -+ # except using providernet_id/providernet-bindings -+ # as the base path. Openstack client framwork does not support what -+ # we need in terms of editing the address at the -+ # time of implementing this -+ data = client.net_list_on_providernet(providernet_id + -+ "/providernet-bindings", **args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_net_list_on_providernet_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -diff --git a/openstackclient/network/v2/providernet_connectivity_test.py b/openstackclient/network/v2/providernet_connectivity_test.py -new file mode 100644 -index 0000000..e879ec2 ---- /dev/null -+++ b/openstackclient/network/v2/providernet_connectivity_test.py -@@ -0,0 +1,220 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Providernet connectivity test action implementations""" -+ -+import itertools -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_formatters = { -+} -+ -+ -+def _get_columns(item): -+ column_map = {} -+ invisible_columns = ["host_id", "host_name", "id", "message", "name", -+ "providernet_id", "providernet_name", -+ "segmentation_id", "status", "type", "updated_at"] -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map, -+ invisible_columns) -+ -+ -+def _get_attrs(client_manager, parsed_args, client): -+ attrs = {key: parsed_args[key] for key in -+ ["providernet", "host", "segmentation_id", "audit_uuid"] -+ if key in parsed_args and parsed_args[key] is not None} -+ if "providernet" in attrs: -+ providernet = client.find_providernet(attrs.pop("providernet"), -+ ignore_missing=False) -+ attrs["providernet_id"] = providernet.id -+ if "host" in attrs: -+ host = client.find_host(attrs.pop("host"), ignore_missing=False) -+ attrs["host_id"] = host.id -+ return attrs -+ -+ -+# copied from neutron client and modified to fit data formats here -+def _list_segments(segments): -+ """Takes a list of segments, and outputs them as a string""" -+ msg = ", ".join([str(x or "*") for x in sorted(segments)]) -+ return msg -+ -+ -+# copied from neutron client and modified to fit data formats here -+def _group_segmentation_id_list(segmentation_ids): -+ """Takes a list of integers and groups them into ranges""" -+ if len(segmentation_ids) < 1: -+ return "" -+ try: -+ sorted_segmentation_ids = sorted( -+ [int(segmentation_id) for segmentation_id in segmentation_ids] -+ ) -+ except Exception: -+ return _list_segments(segmentation_ids) -+ grouped_ids = [tuple(g[1]) for g in itertools.groupby( -+ enumerate(sorted_segmentation_ids), lambda (i, n): i - n -+ )] -+ msg = ", ".join( -+ [(("%s-%s" % (g[0][1], g[-1][1])) if g[0][1] != g[-1][1] -+ else ("%s" % g[0][1])) for g in grouped_ids] -+ ) -+ return msg -+ -+ -+# copied from neutron client and modified to fit data formats here -+def _format_connectivity_results(data): -+ """Takes a list of results, and formats them for reporting -+ -+ order assumed: providernet_id, providernet_name, type, host_name, -+ segmentation_id, status, message -+ """ -+ -+ parsed_results = {} -+ has_message = False -+ for result in data: -+ providernet_id = result.providernet_id -+ providernet_name = result.providernet_name -+ providernet_type = result.type -+ hostname = result.host_name -+ if hasattr(result, "segmentation_id"): -+ segmentation_id = result.segmentation_id -+ else: -+ segmentation_id = None -+ status = result.status -+ message = result.message -+ if message: -+ has_message = True -+ test = (providernet_id, providernet_name, providernet_type, -+ hostname, status, message) -+ if test not in parsed_results: -+ parsed_results[test] = [] -+ parsed_results[test].append(segmentation_id) -+ -+ formatted_results = [] -+ for test, results in parsed_results.iteritems(): -+ (providernet_id, providernet_name, providernet_type, -+ hostname, status, message) = test -+ formatted_segmentation_ids = \ -+ _group_segmentation_id_list(results) -+ -+ if has_message: -+ formatted_result = (providernet_id, -+ providernet_name, -+ providernet_type, -+ hostname, -+ formatted_segmentation_ids, -+ status, -+ message -+ ) -+ else: -+ formatted_result = (providernet_id, -+ providernet_name, -+ providernet_type, -+ hostname, -+ formatted_segmentation_ids, -+ status -+ ) -+ formatted_results.append(formatted_result) -+ -+ return tuple(formatted_results), has_message -+ -+ -+class ListProvidernetConnectivityTest(common.NetworkAndComputeLister): -+ """List providernet connectivity tests""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--audit-uuid', -+ dest='audit_uuid', default=None, -+ help='List only for this audit-uuid') -+ parser.add_argument( -+ '--providernet', -+ dest='providernet', default=None, -+ help='List only for this providernet') -+ parser.add_argument( -+ '--host', -+ dest='host', default=None, -+ help='List only for this host') -+ parser.add_argument( -+ '--segmentation-id', -+ dest='segmentation_id', default=None, -+ help='List only for this segmentation-id') -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ column_headers = ( -+ 'Providernet ID', -+ 'Providernet Name', -+ 'Type', -+ 'Host Name', -+ 'Segmentation IDs', -+ 'Status' -+ ) -+ args = _get_attrs(self.app.client_manager, vars(parsed_args), client) -+ -+ data = client.providernet_connectivity_tests(**args) -+ formatted_data, has_message = _format_connectivity_results(data) -+ -+ # replicate behavior from neutron command: -+ # dont show message column if it does not exist -+ if has_message: -+ column_headers = column_headers + ('Message',) -+ -+ return (column_headers, -+ formatted_data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class CreateProvidernetConnectivityTest(common.NetworkAndComputeShowOne): -+ """Create new providernet connectivity test""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--providernet', -+ dest='providernet', default=None, -+ help=('Schedule audit for given providernet')) -+ parser.add_argument( -+ '--host', -+ dest='host', default=None, -+ help='Schedule audits for all providernets on host') -+ parser.add_argument( -+ '--segmentation-id', -+ dest='segmentation_id', default=None, -+ help='Schedule for this segmentation ID') -+ -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args), client) -+ obj = client.create_providernet_connectivity_test(**attrs) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -diff --git a/openstackclient/network/v2/providernet_range.py b/openstackclient/network/v2/providernet_range.py -new file mode 100644 -index 0000000..8748c4c ---- /dev/null -+++ b/openstackclient/network/v2/providernet_range.py -@@ -0,0 +1,272 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Providernet range action implementations""" -+ -+import argparse -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.i18n import _ -+from openstackclient.identity import common as identity_common -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_formatters = { -+ 'vxlan': utils.format_dict -+} -+ -+ -+def _get_columns(item): -+ column_map = {} -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) -+ -+ -+def _get_attrs(client_manager, parsed_args): -+ attrs = {key: parsed_args[key] for key in -+ ["shared", "description", "name", "group", "ttl", "port", "mode", -+ "providernet_id", "providernet_range_id"] -+ if key in parsed_args} -+ if "range" in parsed_args and parsed_args["range"] is not None: -+ attrs["maximum"] = parsed_args["range"]["maximum"] -+ attrs["minimum"] = parsed_args["range"]["minimum"] -+ if "port" in attrs and attrs["port"] is None: -+ del attrs["port"] -+ if "ttl" in attrs and attrs["ttl"] is None: -+ del attrs["ttl"] -+ if "group" in attrs and attrs["group"] is None: -+ del attrs["group"] -+ if "mode" in attrs and attrs["mode"] is None: -+ del attrs["mode"] -+ if 'project' in parsed_args and parsed_args["project"] is not None: -+ identity_client = client_manager.identity -+ project_id = identity_common.find_project( -+ identity_client, -+ parsed_args["project"] -+ ).id -+ # TODO(dtroyer): Remove tenant_id when we clean up the SDK refactor -+ attrs['tenant_id'] = project_id -+ attrs['project_id'] = project_id -+ -+ return attrs -+ -+ -+def _id_range_value(value): -+ range_list = value.split('-') -+ if (len(range_list) != 2): -+ raise argparse.ArgumentTypeError( -+ 'Expecting MIN_VALUE-MAX_VALUE in range list') -+ return {'minimum': range_list[0], -+ 'maximum': range_list[1]} -+ -+ -+class ListProvidernetRange(common.NetworkAndComputeLister): -+ """List providernet ranges""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'id', -+ 'name', -+ 'providernet_name', -+ 'providernet_type', -+ 'minimum', -+ 'maximum', -+ 'vxlan' -+ ) -+ column_headers = ( -+ 'ID', -+ 'Name', -+ 'Providernet', -+ 'Type', -+ 'Minimum', -+ 'Maximum', -+ 'Attributes' -+ ) -+ -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ -+ data = client.providernet_ranges(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class ShowProvidernetRange(common.NetworkAndComputeShowOne): -+ """Show providernet range details""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'providernet_range', -+ metavar="", -+ help=("Providernet range to display (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_providernet_range(parsed_args.providernet_range, -+ ignore_missing=False) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class CreateProvidernetRange(common.NetworkAndComputeShowOne): -+ """Create new providernet range""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--shared', -+ dest='shared', action='store_true', default=False, -+ help=('Set whether a provider network segmentation id range ' -+ 'may be shared between tenants')) -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)") -+ ) -+ identity_common.add_project_domain_option_to_parser(parser) -+ parser.add_argument( -+ '--description', -+ dest='description', -+ help='Set user-defined description field for a provider network') -+ parser.add_argument( -+ '--range', metavar='MIN_VALUE-MAX_VALUE', required=True, -+ dest='range', type=_id_range_value, -+ help='Segmentation id value range') -+ parser.add_argument( -+ '--name', required=True, -+ dest='name', -+ help=('Set user-defined name for a provider network ' -+ 'segmentation id range')) -+ parser.add_argument( -+ '--group', -+ dest='group', -+ help='Multicast IP addresses for VXLAN endpoints') -+ parser.add_argument( -+ '--ttl', dest='ttl', type=int, -+ help='Time-to-live value for VXLAN provider networks') -+ parser.add_argument( -+ '--port', dest='port', type=int, -+ help=('Destination UDP port value to use for ' -+ 'VXLAN provider networks')) -+ parser.add_argument( -+ '--mode', -+ dest='mode', default='dynamic', -+ choices=['dynamic', 'static', 'evpn'], -+ help='Set vxlan learning mode') -+ parser.add_argument( -+ 'providernet_id', metavar='PROVIDERNET', -+ help='Provider network this segmentation id range belongs to') -+ -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ obj = client.find_providernet(parsed_args.providernet_id, -+ ignore_missing=False) -+ attrs["providernet_id"] = obj.id -+ obj = client.create_providernet_range(**attrs) -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class DeleteProvidernetRange(common.NetworkAndComputeDelete): -+ """Delete providernet range""" -+ -+ # Used by base class to find resources in parsed_args. -+ resource = 'providernet_range' -+ r = None -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ 'providernet_range', -+ metavar="", -+ nargs="+", -+ help=("Providernet to Delete (name or ID)") -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ obj = client.find_providernet_range(self.r) -+ client.delete_providernet_range(obj) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class UpdateProvidernetRange(command.Command): -+ """Set providernet range properties""" -+ -+ def get_parser(self, prog_name): -+ parser = super(UpdateProvidernetRange, self).get_parser(prog_name) -+ parser.add_argument( -+ '--description', -+ dest='description', -+ help='Set user-defined description field for a provider network') -+ parser.add_argument( -+ '--range', metavar='MIN_VALUE-MAX_VALUE', -+ dest='range', type=_id_range_value, -+ help='Segmentation id value range') -+ parser.add_argument( -+ 'providernet_range_id', metavar='PROVIDERNET_RANGE', -+ help='Name or ID of this providernet range') -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.network -+ obj = client.find_providernet_range(parsed_args.providernet_range_id, -+ ignore_missing=False) -+ -+ attrs = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ del attrs['providernet_range_id'] -+ -+ if attrs == {}: -+ msg = "Nothing specified to be set" -+ raise exceptions.CommandError(msg) -+ client.update_providernet_range(obj, **attrs) -+ return -diff --git a/openstackclient/network/v2/providernet_type.py b/openstackclient/network/v2/providernet_type.py -new file mode 100644 -index 0000000..2abd8c4 ---- /dev/null -+++ b/openstackclient/network/v2/providernet_type.py -@@ -0,0 +1,60 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Providernet type action implementations""" -+ -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_formatters = { -+} -+ -+ -+class ListProvidernetType(common.NetworkAndComputeLister): -+ """List providernet types""" -+ -+ def update_parser_common(self, parser): -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'type', -+ 'description' -+ ) -+ column_headers = ( -+ 'Type', -+ 'Description' -+ ) -+ -+ args = {} -+ -+ data = client.providernet_types(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py -index 4f90853..4eb5908 100644 ---- a/openstackclient/network/v2/router.py -+++ b/openstackclient/network/v2/router.py -@@ -68,6 +68,7 @@ def _get_columns(item): - 'is_ha': 'ha', - 'is_distributed': 'distributed', - 'is_admin_state_up': 'admin_state_up', -+ 'host': 'wrs-net:host', - } - return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map) - -diff --git a/openstackclient/network/v2/setting.py b/openstackclient/network/v2/setting.py -new file mode 100644 -index 0000000..d404325 ---- /dev/null -+++ b/openstackclient/network/v2/setting.py -@@ -0,0 +1,183 @@ -+# 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. -+# -+# Copyright (c) 2016 Wind River Systems, Inc. -+# -+# -+# -+# -+# -+ -+"""Settings action implementations""" -+ -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+from openstackclient.i18n import _ -+from openstackclient.identity import common as identity_common -+from openstackclient.network import common -+from openstackclient.network import sdk_utils -+ -+_formatters = {} -+ -+ -+def _get_columns(item): -+ column_map = {"id": "project_id"} -+ invisible_columns = ["name"] -+ return sdk_utils.get_osc_show_columns_for_sdk_resource(item, column_map, -+ invisible_columns) -+ -+ -+def _get_attrs(client_manager, parsed_args): -+ attrs = {key: parsed_args[key] for key in ["mac_filtering"] -+ if key in parsed_args} -+ -+ if 'project' in parsed_args and parsed_args["project"] is not None: -+ identity_client = client_manager.identity -+ project_id = identity_common.find_project( -+ identity_client, -+ parsed_args["project"] -+ ).id -+ attrs['project_id'] = project_id -+ -+ return attrs -+ -+ -+class ListSetting(common.NetworkAndComputeLister): -+ """List settings of all projects who have non-default setting values""" -+ -+ def update_parser_common(self, parser): -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ columns = ( -+ 'mac_filtering', -+ 'project_id' -+ ) -+ column_headers = ( -+ 'Mac Filtering', -+ 'Project ID' -+ ) -+ -+ args = {} -+ -+ data = client.settings(**args) -+ -+ return (column_headers, -+ (utils.get_item_properties( -+ s, columns, -+ formatters=_formatters, -+ ) for s in data)) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+class ShowSetting(common.NetworkAndComputeShowOne): -+ """Show settings of a given project""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)"), -+ required=False -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ client = self.app.client_manager.network -+ # if no project id is specified, operate on current project -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ if not "project_id" in args: -+ args["project_id"] = client.find_tenant().project_id -+ project_id = args["project_id"] -+ -+ obj = client.find_setting(project_id, ignore_missing=False) -+ -+ display_columns, columns = _get_columns(obj) -+ data = utils.get_item_properties(obj, columns, formatters=_formatters) -+ return (display_columns, data) -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs access to" -+ " a network endpoint.") -+ return -+ -+ -+# this one uses NetworkAndComputeCommand because settings can be deleted -+# without a project id -+class DeleteSetting(common.NetworkAndComputeCommand): -+ """Delete setting""" -+ -+ def update_parser_common(self, parser): -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)"), -+ required=False -+ ) -+ return parser -+ -+ def take_action_network(self, client, parsed_args): -+ client = self.app.client_manager.network -+ # if no project id is specified, operate on current project -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ if not "project_id" in args: -+ args["project_id"] = client.find_tenant().project_id -+ project_id = args["project_id"] -+ -+ client.delete_setting(project_id) -+ return -+ -+ def take_action_compute(self, client, parsed_args): -+ raise exceptions.CommandError("This command needs " -+ "access to a network endpoint.") -+ return -+ -+ -+class UpdateSetting(command.Command): -+ """Set setting properties""" -+ -+ def get_parser(self, prog_name): -+ parser = super(UpdateSetting, self).get_parser(prog_name) -+ parser.add_argument( -+ '--project', -+ metavar='', -+ help=_("Owner's project (name or ID)"), -+ required=False -+ ) -+ parser.add_argument('--mac-filtering', metavar='mac_filtering', -+ help="Enable/Disable source MAC filtering" -+ " on all ports", -+ required=True) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.network -+ # if no project id is specified, operate on current project -+ args = _get_attrs(self.app.client_manager, vars(parsed_args)) -+ if not "project_id" in args: -+ args["project_id"] = client.find_tenant().project_id -+ project_id = args["project_id"] -+ del args['project_id'] -+ -+ client.find_setting(project_id, ignore_missing=False) -+ -+ if args == {}: -+ msg = "Nothing specified to be set" -+ raise exceptions.CommandError(msg) -+ -+ client.update_setting(project_id, **args) -+ return -diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py -index b96dff7..864c832 100644 ---- a/openstackclient/network/v2/subnet.py -+++ b/openstackclient/network/v2/subnet.py -@@ -13,7 +13,9 @@ - - """Subnet action implementations""" - -+import argparse - import copy -+import functools - import logging - - from osc_lib.cli import parseractions -@@ -27,6 +29,10 @@ from openstackclient.network import sdk_utils - from openstackclient.network.v2 import _tag - - -+MIN_VLAN_TAG = 1 -+MAX_VLAN_TAG = 4094 -+ -+ - LOG = logging.getLogger(__name__) - - -@@ -233,9 +239,36 @@ def _get_attrs(client_manager, parsed_args, is_create=True): - attrs['service_types'] = parsed_args.service_types - if parsed_args.description is not None: - attrs['description'] = parsed_args.description -+ -+ # wrs extensions -+ if ('vlan_id' in parsed_args and -+ parsed_args.vlan_id is not None): -+ attrs['wrs-net:vlan_id'] = parsed_args.vlan_id -+ if ('network_type' in parsed_args and -+ parsed_args.network_type is not None): -+ attrs['wrs-provider:network_type'] = parsed_args.network_type -+ if ('physical_network' in parsed_args and -+ parsed_args.physical_network is not None): -+ attrs['wrs-provider:vlan_id'] = parsed_args.physical_network -+ if ('segmentation_id' in parsed_args and -+ parsed_args.segmentation_id is not None): -+ attrs['wrs-provider:segmentation_id'] = parsed_args.segmentation_id -+ if ('unmanaged' in parsed_args and -+ parsed_args.unmanaged is not False): -+ attrs['wrs-net:managed'] = False -+ - return attrs - - -+def _check_vlan_id(value): -+ vlan_id = int(value) -+ if vlan_id < MIN_VLAN_TAG or vlan_id > MAX_VLAN_TAG: -+ raise argparse.ArgumentTypeError( -+ "VLAN ID must be between {} and {}".format( -+ MIN_VLAN_TAG, MAX_VLAN_TAG)) -+ return vlan_id -+ -+ - # TODO(abhiraut): Use the SDK resource mapped attribute names once the - # OSC minimum requirements include SDK 1.0. - class CreateSubnet(command.ShowOne): -@@ -337,6 +370,27 @@ class CreateSubnet(command.ShowOne): - metavar='', - help=_("Set subnet description") - ) -+ parser.add_argument( -+ '--wrs-net:vlan_id', -+ dest='vlan_id', -+ type=_check_vlan_id, -+ help='VLAN ID of the subnet') -+ parser.add_argument( -+ '--wrs-provider:network_type', -+ dest='network_type', -+ help='Provider network type (admin only)') -+ parser.add_argument( -+ '--wrs-provider:physical_network', -+ dest='physical_network', -+ help='Provider network name (admin only)') -+ parser.add_argument( -+ '--wrs-provider:segmentation_id', -+ dest='segmentation_id', -+ help='Provider network segmentation id (admin only)') -+ parser.add_argument( -+ '--unmanaged', -+ action='store_true', -+ help='Disable IP allocation on this subnet') - _get_common_parse_arguments(parser) - _tag.add_tag_option_to_parser_for_create(parser, _('subnet')) - return parser -@@ -497,14 +551,16 @@ class ListSubnet(command.Lister): - _tag.get_tag_filtering_args(parsed_args, filters) - data = network_client.subnets(**filters) - -- headers = ('ID', 'Name', 'Network', 'Subnet') -- columns = ('id', 'name', 'network_id', 'cidr') -+ headers = ('ID', 'Name', 'Network', 'Subnet', 'Allocation Pools', -+ 'WRS-Net:VLAN ID') -+ columns = ('id', 'name', 'network_id', 'cidr', 'allocation_pools', -+ 'wrs-net:vlan_id') - if parsed_args.long: - headers += ('Project', 'DHCP', 'Name Servers', -- 'Allocation Pools', 'Host Routes', 'IP Version', -+ 'Host Routes', 'IP Version', - 'Gateway', 'Service Types', 'Tags') - columns += ('project_id', 'is_dhcp_enabled', 'dns_nameservers', -- 'allocation_pools', 'host_routes', 'ip_version', -+ 'host_routes', 'ip_version', - 'gateway_ip', 'service_types', 'tags') - - return (headers, -diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py -index eadab58..0d53fc5 100644 ---- a/openstackclient/tests/unit/network/v2/fakes.py -+++ b/openstackclient/tests/unit/network/v2/fakes.py -@@ -1244,7 +1244,8 @@ class FakeSecurityGroupRule(object): - - @staticmethod - def get_security_group_rules(security_group_rules=None, count=2): -- """Get an iterable Mock object with a list of faked security group rules. -+ """Get an iterable Mock object with a list of faked security group -+ rules. - - If security group rules list is provided, then initialize the Mock - object with the list. Otherwise create one. -@@ -1298,6 +1299,7 @@ class FakeSubnet(object): - 'subnetpool_id': None, - 'description': 'subnet-description-' + uuid.uuid4().hex, - 'tags': [], -+ 'wrs-net:vlan_id': '1', - } - - # Overwrite default attributes. -diff --git a/openstackclient/tests/unit/network/v2/test_subnet.py b/openstackclient/tests/unit/network/v2/test_subnet.py -index c96d680..a4c8914 100644 ---- a/openstackclient/tests/unit/network/v2/test_subnet.py -+++ b/openstackclient/tests/unit/network/v2/test_subnet.py -@@ -126,6 +126,7 @@ class TestCreateSubnet(TestSubnet): - 'service_types', - 'subnetpool_id', - 'tags', -+ 'wrs-net:vlan_id', - ) - - data = ( -@@ -147,6 +148,7 @@ class TestCreateSubnet(TestSubnet): - utils.format_list(_subnet.service_types), - _subnet.subnetpool_id, - utils.format_list(_subnet.tags), -+ getattr(_subnet, 'wrs-net:vlan_id', ''), - ) - - data_subnet_pool = ( -@@ -168,6 +170,7 @@ class TestCreateSubnet(TestSubnet): - utils.format_list(_subnet_from_pool.service_types), - _subnet_from_pool.subnetpool_id, - utils.format_list(_subnet.tags), -+ getattr(_subnet_from_pool, 'wrs-net:vlan_id', ''), - ) - - data_ipv6 = ( -@@ -189,6 +192,7 @@ class TestCreateSubnet(TestSubnet): - utils.format_list(_subnet_ipv6.service_types), - _subnet_ipv6.subnetpool_id, - utils.format_list(_subnet.tags), -+ getattr(_subnet_ipv6, 'wrs-net:vlan_id', ''), - ) - - def setUp(self): -@@ -589,12 +593,13 @@ class TestListSubnet(TestSubnet): - 'Name', - 'Network', - 'Subnet', -+ 'Allocation Pools', -+ 'WRS-Net:VLAN ID', - ) - columns_long = columns + ( - 'Project', - 'DHCP', - 'Name Servers', -- 'Allocation Pools', - 'Host Routes', - 'IP Version', - 'Gateway', -@@ -609,6 +614,8 @@ class TestListSubnet(TestSubnet): - subnet.name, - subnet.network_id, - subnet.cidr, -+ subnet_v2._format_allocation_pools(subnet.allocation_pools), -+ getattr(subnet, 'wrs-net:vlan_id', ''), - )) - - data_long = [] -@@ -618,10 +625,11 @@ class TestListSubnet(TestSubnet): - subnet.name, - subnet.network_id, - subnet.cidr, -+ subnet_v2._format_allocation_pools(subnet.allocation_pools), -+ getattr(subnet, 'wrs-net:vlan_id', ''), - subnet.tenant_id, - subnet.enable_dhcp, - utils.format_list(subnet.dns_nameservers), -- subnet_v2._format_allocation_pools(subnet.allocation_pools), - utils.format_list(subnet.host_routes), - subnet.ip_version, - subnet.gateway_ip, -@@ -1093,6 +1101,7 @@ class TestShowSubnet(TestSubnet): - 'service_types', - 'subnetpool_id', - 'tags', -+ 'wrs-net:vlan_id', - ) - - data = ( -@@ -1114,6 +1123,7 @@ class TestShowSubnet(TestSubnet): - utils.format_list(_subnet.service_types), - _subnet.subnetpool_id, - utils.format_list(_subnet.tags), -+ getattr(_subnet, 'wrs-net:vlan_id', ''), - ) - - def setUp(self): -diff --git a/setup.cfg b/setup.cfg -index 0afa479..1bff735 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -398,6 +398,34 @@ openstack.network.v2 = - subnet_pool_set = openstackclient.network.v2.subnet_pool:SetSubnetPool - subnet_pool_show = openstackclient.network.v2.subnet_pool:ShowSubnetPool - subnet_pool_unset = openstackclient.network.v2.subnet_pool:UnsetSubnetPool -+ providernet_list = openstackclient.network.v2.providernet:ListProvidernet -+ providernet_show = openstackclient.network.v2.providernet:ShowProvidernet -+ providernet_create = openstackclient.network.v2.providernet:CreateProvidernet -+ providernet_update = openstackclient.network.v2.providernet:UpdateProvidernet -+ providernet_delete = openstackclient.network.v2.providernet:DeleteProvidernet -+ providernet_range_list = openstackclient.network.v2.providernet_range:ListProvidernetRange -+ providernet_range_show = openstackclient.network.v2.providernet_range:ShowProvidernetRange -+ providernet_range_create = openstackclient.network.v2.providernet_range:CreateProvidernetRange -+ providernet_range_update = openstackclient.network.v2.providernet_range:UpdateProvidernetRange -+ providernet_range_delete = openstackclient.network.v2.providernet_range:DeleteProvidernetRange -+ portforwarding_list = openstackclient.network.v2.portforwarding:ListPortforwarding -+ portforwarding_show = openstackclient.network.v2.portforwarding:ShowPortforwarding -+ portforwarding_create = openstackclient.network.v2.portforwarding:CreatePortforwarding -+ portforwarding_update = openstackclient.network.v2.portforwarding:UpdatePortforwarding -+ portforwarding_delete = openstackclient.network.v2.portforwarding:DeletePortforwarding -+ setting_list = openstackclient.network.v2.setting:ListSetting -+ setting_show = openstackclient.network.v2.setting:ShowSetting -+ setting_update = openstackclient.network.v2.setting:UpdateSetting -+ setting_delete = openstackclient.network.v2.setting:DeleteSetting -+ net_host_list = openstackclient.network.v2.host:ListHost -+ net_host_show = openstackclient.network.v2.host:ShowHost -+ net_host_create = openstackclient.network.v2.host:CreateHost -+ net_host_update = openstackclient.network.v2.host:UpdateHost -+ net_host_delete = openstackclient.network.v2.host:DeleteHost -+ providernet_type_list = openstackclient.network.v2.providernet_type:ListProvidernetType -+ providernet_connectivity_test_list = openstackclient.network.v2.providernet_connectivity_test:ListProvidernetConnectivityTest -+ providernet_connectivity_test_schedule = openstackclient.network.v2.providernet_connectivity_test:CreateProvidernetConnectivityTest -+ net_list_on_providernet = openstackclient.network.v2.providernet:NetListOnProvidernet - openstack.object_store.v1 = - object_store_account_set = openstackclient.object.v1.account:SetAccount - object_store_account_show = openstackclient.object.v1.account:ShowAccount diff --git a/openstack/python-openstackclient/centos/patches/0002-Add-support-for-endpoing-filter-commands.patch b/openstack/python-openstackclient/centos/patches/0002-Add-support-for-endpoing-filter-commands.patch deleted file mode 100644 index 201eed54..00000000 --- a/openstack/python-openstackclient/centos/patches/0002-Add-support-for-endpoing-filter-commands.patch +++ /dev/null @@ -1,614 +0,0 @@ -From 8d106e1f1b3e536127818e98e495343e3c85f6b1 Mon Sep 17 00:00:00 2001 -From: Jose Castro Leon -Date: Wed, 25 Oct 2017 15:39:44 +0200 -Subject: [PATCH] Add support for endpoing filter commands - -Implements the commands that allow to link and endpoint to -a project for endpoint filter management. - -Implements: blueprint keystone-endpoint-filter - -Change-Id: Iecf61495664fb8413d35ef69f07ea929d190d002 -Signed-off-by: Kam Nasim ---- - doc/source/cli/command-objects/endpoint.rst | 79 +++++++++++ - openstackclient/identity/v3/endpoint.py | 147 ++++++++++++++++++--- - .../tests/functional/identity/v3/common.py | 1 + - .../tests/functional/identity/v3/test_endpoint.py | 42 ++++++ - openstackclient/tests/unit/identity/v3/fakes.py | 27 ++++ - .../tests/unit/identity/v3/test_endpoint.py | 139 +++++++++++++++++++ - .../keystone-endpoint-filter-e930a7b72276fa2c.yaml | 5 + - setup.cfg | 9 +- - 8 files changed, 429 insertions(+), 20 deletions(-) - create mode 100644 releasenotes/notes/keystone-endpoint-filter-e930a7b72276fa2c.yaml - -diff --git a/doc/source/cli/command-objects/endpoint.rst b/doc/source/cli/command-objects/endpoint.rst -index 02a75be..030947c 100644 ---- a/doc/source/cli/command-objects/endpoint.rst -+++ b/doc/source/cli/command-objects/endpoint.rst -@@ -4,6 +4,34 @@ endpoint - - Identity v2, v3 - -+endpoint add project -+-------------------- -+ -+Associate a project to and endpoint for endpoint filtering -+ -+.. program:: endpoint add project -+.. code:: bash -+ -+ openstack endpoint add project -+ [--project-domain ] -+ -+ -+ -+.. option:: --project-domain -+ -+ Domain the project belongs to (name or ID). -+ This can be used in case collisions between project names exist. -+ -+.. _endpoint_add_project-endpoint: -+.. describe:: -+ -+ Endpoint to associate with specified project (name or ID) -+ -+.. _endpoint_add_project-project: -+.. describe:: -+ -+ Project to associate with specified endpoint (name or ID) -+ - endpoint create - --------------- - -@@ -107,6 +135,8 @@ List endpoints - [--interface ] - [--region ] - [--long] -+ [--endpoint | -+ --project [--project-domain ]] - - .. option:: --service - -@@ -132,6 +162,55 @@ List endpoints - - *Identity version 2 only* - -+.. option:: --endpoint -+ -+ List projects that have access to that endpoint using -+ endpoint filtering -+ -+ *Identity version 3 only* -+ -+.. option:: --project -+ -+ List endpoints available for the project using -+ endpoint filtering -+ -+ *Identity version 3 only* -+ -+.. option:: --project-domain -+ -+ Domain the project belongs to (name or ID). -+ This can be used in case collisions between project names exist. -+ -+ *Identity version 3 only* -+ -+endpoint remove project -+----------------------- -+ -+Dissociate a project from an endpoint. -+ -+.. program:: endpoint remove project -+.. code:: bash -+ -+ openstack endpoint remove project -+ [--project-domain ] -+ -+ -+ -+.. option:: --project-domain -+ -+ Domain the project belongs to (name or ID). -+ This can be used in case collisions between project names exist. -+ -+.. _endpoint_remove_project-endpoint: -+.. describe:: -+ -+ Endpoint to dissociate with specified project (name or ID) -+ -+.. _endpoint_remove_project-project: -+.. describe:: -+ -+ Project to dissociate with specified endpoint (name or ID) -+ - endpoint set - ------------ - -diff --git a/openstackclient/identity/v3/endpoint.py b/openstackclient/identity/v3/endpoint.py -index 3b4dd0d..649a230 100644 ---- a/openstackclient/identity/v3/endpoint.py -+++ b/openstackclient/identity/v3/endpoint.py -@@ -36,6 +36,42 @@ def get_service_name(service): - return '' - - -+class AddProjectToEndpoint(command.Command): -+ _description = _("Associate a project to an endpoint") -+ -+ def get_parser(self, prog_name): -+ parser = super( -+ AddProjectToEndpoint, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpoint', -+ metavar='', -+ help=_('Endpoint to associate with ' -+ 'specified project (name or ID)'), -+ ) -+ parser.add_argument( -+ 'project', -+ metavar='', -+ help=_('Project to associate with ' -+ 'specified endpoint name or ID)'), -+ ) -+ common.add_project_domain_option_to_parser(parser) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.identity -+ -+ endpoint = utils.find_resource(client.endpoints, -+ parsed_args.endpoint) -+ -+ project = common.find_project(client, -+ parsed_args.project, -+ parsed_args.project_domain) -+ -+ client.endpoint_filter.add_endpoint_to_project( -+ project=project.id, -+ endpoint=endpoint.id) -+ -+ - class CreateEndpoint(command.ShowOne): - _description = _("Create new endpoint") - -@@ -152,27 +188,68 @@ class ListEndpoint(command.Lister): - metavar='', - help=_('Filter by region ID'), - ) -+ list_group = parser.add_mutually_exclusive_group() -+ list_group.add_argument( -+ '--endpoint', -+ metavar='', -+ help=_('Endpoint to list filters'), -+ ) -+ list_group.add_argument( -+ '--project', -+ metavar='', -+ help=_('Project to list filters (name or ID)'), -+ ) -+ common.add_project_domain_option_to_parser(list_group) - return parser - - def take_action(self, parsed_args): - identity_client = self.app.client_manager.identity -- columns = ('ID', 'Region', 'Service Name', 'Service Type', -- 'Enabled', 'Interface', 'URL') -- kwargs = {} -- if parsed_args.service: -- service = common.find_service(identity_client, parsed_args.service) -- kwargs['service'] = service.id -- if parsed_args.interface: -- kwargs['interface'] = parsed_args.interface -- if parsed_args.region: -- kwargs['region'] = parsed_args.region -- data = identity_client.endpoints.list(**kwargs) -- service_list = identity_client.services.list() -- -- for ep in data: -- service = common.find_service_in_list(service_list, ep.service_id) -- ep.service_name = get_service_name(service) -- ep.service_type = service.type -+ -+ endpoint = None -+ if parsed_args.endpoint: -+ endpoint = utils.find_resource(identity_client.endpoints, -+ parsed_args.endpoint) -+ project = None -+ if parsed_args.project: -+ project = common.find_project(identity_client, -+ parsed_args.project, -+ parsed_args.project_domain) -+ -+ if endpoint: -+ columns = ('ID', 'Name') -+ data = ( -+ identity_client.endpoint_filter -+ .list_projects_for_endpoint(endpoint=endpoint.id) -+ ) -+ else: -+ columns = ('ID', 'Region', 'Service Name', 'Service Type', -+ 'Enabled', 'Interface', 'URL') -+ kwargs = {} -+ if parsed_args.service: -+ service = common.find_service(identity_client, -+ parsed_args.service) -+ kwargs['service'] = service.id -+ if parsed_args.interface: -+ kwargs['interface'] = parsed_args.interface -+ if parsed_args.region: -+ kwargs['region'] = parsed_args.region -+ -+ if project: -+ data = ( -+ identity_client.endpoint_filter -+ .list_endpoints_for_project(project=project.id) -+ ) -+ else: -+ data = identity_client.endpoints.list(**kwargs) -+ -+ service_list = identity_client.services.list() -+ -+ for ep in data: -+ service = common.find_service_in_list(service_list, -+ ep.service_id) -+ ep.service_name = get_service_name(service) -+ ep.service_type = service.type -+ - return (columns, - (utils.get_item_properties( - s, columns, -@@ -180,6 +257,42 @@ class ListEndpoint(command.Lister): - ) for s in data)) - - -+class RemoveProjectFromEndpoint(command.Command): -+ _description = _("Dissociate a project from an endpoint") -+ -+ def get_parser(self, prog_name): -+ parser = super( -+ RemoveProjectFromEndpoint, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpoint', -+ metavar='', -+ help=_('Endpoint to dissociate from ' -+ 'specified project (name or ID)'), -+ ) -+ parser.add_argument( -+ 'project', -+ metavar='', -+ help=_('Project to dissociate from ' -+ 'specified endpoint name or ID)'), -+ ) -+ common.add_project_domain_option_to_parser(parser) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.identity -+ -+ endpoint = utils.find_resource(client.endpoints, -+ parsed_args.endpoint) -+ -+ project = common.find_project(client, -+ parsed_args.project, -+ parsed_args.project_domain) -+ -+ client.endpoint_filter.delete_endpoint_from_project( -+ project=project.id, -+ endpoint=endpoint.id) -+ -+ - class SetEndpoint(command.Command): - _description = _("Set endpoint properties") - -diff --git a/openstackclient/tests/functional/identity/v3/common.py b/openstackclient/tests/functional/identity/v3/common.py -index 6d7896d..33cb5d8 100644 ---- a/openstackclient/tests/functional/identity/v3/common.py -+++ b/openstackclient/tests/functional/identity/v3/common.py -@@ -42,6 +42,7 @@ class IdentityTests(base.TestCase): - REGION_LIST_HEADERS = ['Region', 'Parent Region', 'Description'] - ENDPOINT_LIST_HEADERS = ['ID', 'Region', 'Service Name', 'Service Type', - 'Enabled', 'Interface', 'URL'] -+ ENDPOINT_LIST_PROJECT_HEADERS = ['ID', 'Name'] - - IDENTITY_PROVIDER_FIELDS = ['description', 'enabled', 'id', 'remote_ids', - 'domain_id'] -diff --git a/openstackclient/tests/functional/identity/v3/test_endpoint.py b/openstackclient/tests/functional/identity/v3/test_endpoint.py -index 22dc1b6..41f0b4c 100644 ---- a/openstackclient/tests/functional/identity/v3/test_endpoint.py -+++ b/openstackclient/tests/functional/identity/v3/test_endpoint.py -@@ -42,6 +42,29 @@ class EndpointTests(common.IdentityTests): - items = self.parse_listing(raw_output) - self.assert_table_structure(items, self.ENDPOINT_LIST_HEADERS) - -+ def test_endpoint_list_filter(self): -+ endpoint_id = self._create_dummy_endpoint(add_clean_up=False) -+ project_id = self._create_dummy_project(add_clean_up=False) -+ raw_output = self.openstack( -+ 'endpoint add project ' -+ '%(endpoint_id)s ' -+ '%(project_id)s' % { -+ 'project_id': project_id, -+ 'endpoint_id': endpoint_id}) -+ self.assertEqual(0, len(raw_output)) -+ raw_output = self.openstack( -+ 'endpoint list --endpoint %s' % endpoint_id) -+ self.assertIn(project_id, raw_output) -+ items = self.parse_listing(raw_output) -+ self.assert_table_structure(items, -+ self.ENDPOINT_LIST_PROJECT_HEADERS) -+ -+ raw_output = self.openstack( -+ 'endpoint list --project %s' % project_id) -+ self.assertIn(endpoint_id, raw_output) -+ items = self.parse_listing(raw_output) -+ self.assert_table_structure(items, self.ENDPOINT_LIST_HEADERS) -+ - def test_endpoint_set(self): - endpoint_id = self._create_dummy_endpoint() - new_endpoint_url = data_utils.rand_url() -@@ -65,3 +88,22 @@ class EndpointTests(common.IdentityTests): - raw_output = self.openstack('endpoint show %s' % endpoint_id) - items = self.parse_show(raw_output) - self.assert_show_fields(items, self.ENDPOINT_FIELDS) -+ -+ def test_endpoint_add_remove_project(self): -+ endpoint_id = self._create_dummy_endpoint(add_clean_up=False) -+ project_id = self._create_dummy_project(add_clean_up=False) -+ raw_output = self.openstack( -+ 'endpoint add project ' -+ '%(endpoint_id)s ' -+ '%(project_id)s' % { -+ 'project_id': project_id, -+ 'endpoint_id': endpoint_id}) -+ self.assertEqual(0, len(raw_output)) -+ -+ raw_output = self.openstack( -+ 'endpoint remove project ' -+ '%(endpoint_id)s ' -+ '%(project_id)s' % { -+ 'project_id': project_id, -+ 'endpoint_id': endpoint_id}) -+ self.assertEqual(0, len(raw_output)) -diff --git a/openstackclient/tests/unit/identity/v3/fakes.py b/openstackclient/tests/unit/identity/v3/fakes.py -index c7d2988..549a1aa 100644 ---- a/openstackclient/tests/unit/identity/v3/fakes.py -+++ b/openstackclient/tests/unit/identity/v3/fakes.py -@@ -491,6 +491,8 @@ class FakeIdentityv3Client(object): - self.credentials.resource_class = fakes.FakeResource(None, {}) - self.endpoints = mock.Mock() - self.endpoints.resource_class = fakes.FakeResource(None, {}) -+ self.endpoint_filter = mock.Mock() -+ self.endpoint_filter.resource_class = fakes.FakeResource(None, {}) - self.groups = mock.Mock() - self.groups.resource_class = fakes.FakeResource(None, {}) - self.oauth1 = mock.Mock() -@@ -909,6 +911,31 @@ class FakeEndpoint(object): - loaded=True) - return endpoint - -+ @staticmethod -+ def create_one_endpoint_filter(attrs=None): -+ """Create a fake endpoint project relationship. -+ -+ :param Dictionary attrs: -+ A dictionary with all attributes of endpoint filter -+ :return: -+ A FakeResource object with project, endpoint and so on -+ """ -+ attrs = attrs or {} -+ -+ # Set default attribute -+ endpoint_filter_info = { -+ 'project': 'project-id-' + uuid.uuid4().hex, -+ 'endpoint': 'endpoint-id-' + uuid.uuid4().hex, -+ } -+ -+ # Overwrite default attributes if there are some attributes set -+ endpoint_filter_info.update(attrs) -+ -+ endpoint_filter = fakes.FakeModel( -+ copy.deepcopy(endpoint_filter_info)) -+ -+ return endpoint_filter -+ - - class FakeService(object): - """Fake one or more service.""" -diff --git a/openstackclient/tests/unit/identity/v3/test_endpoint.py b/openstackclient/tests/unit/identity/v3/test_endpoint.py -index fad53fc..bfe930d 100644 ---- a/openstackclient/tests/unit/identity/v3/test_endpoint.py -+++ b/openstackclient/tests/unit/identity/v3/test_endpoint.py -@@ -22,11 +22,23 @@ class TestEndpoint(identity_fakes.TestIdentityv3): - # Get a shortcut to the EndpointManager Mock - self.endpoints_mock = self.app.client_manager.identity.endpoints - self.endpoints_mock.reset_mock() -+ self.ep_filter_mock = ( -+ self.app.client_manager.identity.endpoint_filter -+ ) -+ self.ep_filter_mock.reset_mock() - - # Get a shortcut to the ServiceManager Mock - self.services_mock = self.app.client_manager.identity.services - self.services_mock.reset_mock() - -+ # Get a shortcut to the DomainManager Mock -+ self.domains_mock = self.app.client_manager.identity.domains -+ self.domains_mock.reset_mock() -+ -+ # Get a shortcut to the ProjectManager Mock -+ self.projects_mock = self.app.client_manager.identity.projects -+ self.projects_mock.reset_mock() -+ - - class TestEndpointCreate(TestEndpoint): - -@@ -750,3 +762,130 @@ class TestEndpointShowServiceWithoutName(TestEndpointShow): - - # Get the command object to test - self.cmd = endpoint.ShowEndpoint(self.app, None) -+ -+ -+class TestAddProjectToEndpoint(TestEndpoint): -+ -+ project = identity_fakes.FakeProject.create_one_project() -+ domain = identity_fakes.FakeDomain.create_one_domain() -+ service = identity_fakes.FakeService.create_one_service() -+ endpoint = identity_fakes.FakeEndpoint.create_one_endpoint( -+ attrs={'service_id': service.id}) -+ -+ new_ep_filter = identity_fakes.FakeEndpoint.create_one_endpoint_filter( -+ attrs={'endpoint': endpoint.id, -+ 'project': project.id} -+ ) -+ -+ def setUp(self): -+ super(TestAddProjectToEndpoint, self).setUp() -+ -+ # This is the return value for utils.find_resource() -+ self.endpoints_mock.get.return_value = self.endpoint -+ -+ # Update the image_id in the MEMBER dict -+ self.ep_filter_mock.create.return_value = self.new_ep_filter -+ self.projects_mock.get.return_value = self.project -+ self.domains_mock.get.return_value = self.domain -+ # Get the command object to test -+ self.cmd = endpoint.AddProjectToEndpoint(self.app, None) -+ -+ def test_add_project_to_endpoint_no_option(self): -+ arglist = [ -+ self.endpoint.id, -+ self.project.id, -+ ] -+ verifylist = [ -+ ('endpoint', self.endpoint.id), -+ ('project', self.project.id), -+ ] -+ parsed_args = self.check_parser(self.cmd, arglist, verifylist) -+ -+ result = self.cmd.take_action(parsed_args) -+ self.ep_filter_mock.add_endpoint_to_project.assert_called_with( -+ project=self.project.id, -+ endpoint=self.endpoint.id -+ ) -+ self.assertIsNone(result) -+ -+ def test_add_project_to_endpoint_with_option(self): -+ arglist = [ -+ self.endpoint.id, -+ self.project.id, -+ '--project-domain', self.domain.id, -+ ] -+ verifylist = [ -+ ('endpoint', self.endpoint.id), -+ ('project', self.project.id), -+ ('project_domain', self.domain.id), -+ ] -+ parsed_args = self.check_parser(self.cmd, arglist, verifylist) -+ -+ result = self.cmd.take_action(parsed_args) -+ self.ep_filter_mock.add_endpoint_to_project.assert_called_with( -+ project=self.project.id, -+ endpoint=self.endpoint.id -+ ) -+ self.assertIsNone(result) -+ -+ -+class TestRemoveProjectEndpoint(TestEndpoint): -+ -+ project = identity_fakes.FakeProject.create_one_project() -+ domain = identity_fakes.FakeDomain.create_one_domain() -+ service = identity_fakes.FakeService.create_one_service() -+ endpoint = identity_fakes.FakeEndpoint.create_one_endpoint( -+ attrs={'service_id': service.id}) -+ -+ def setUp(self): -+ super(TestRemoveProjectEndpoint, self).setUp() -+ -+ # This is the return value for utils.find_resource() -+ self.endpoints_mock.get.return_value = self.endpoint -+ -+ self.projects_mock.get.return_value = self.project -+ self.domains_mock.get.return_value = self.domain -+ self.ep_filter_mock.delete.return_value = None -+ -+ # Get the command object to test -+ self.cmd = endpoint.RemoveProjectFromEndpoint(self.app, None) -+ -+ def test_remove_project_endpoint_no_options(self): -+ arglist = [ -+ self.endpoint.id, -+ self.project.id, -+ ] -+ verifylist = [ -+ ('endpoint', self.endpoint.id), -+ ('project', self.project.id), -+ ] -+ parsed_args = self.check_parser(self.cmd, arglist, verifylist) -+ -+ result = self.cmd.take_action(parsed_args) -+ -+ self.ep_filter_mock.delete_endpoint_from_project.assert_called_with( -+ project=self.project.id, -+ endpoint=self.endpoint.id, -+ ) -+ self.assertIsNone(result) -+ -+ def test_remove_project_endpoint_with_options(self): -+ arglist = [ -+ self.endpoint.id, -+ self.project.id, -+ '--project-domain', self.domain.id, -+ ] -+ verifylist = [ -+ ('endpoint', self.endpoint.id), -+ ('project', self.project.id), -+ ('project_domain', self.domain.id), -+ ] -+ parsed_args = self.check_parser(self.cmd, arglist, verifylist) -+ -+ result = self.cmd.take_action(parsed_args) -+ -+ self.ep_filter_mock.delete_endpoint_from_project.assert_called_with( -+ project=self.project.id, -+ endpoint=self.endpoint.id, -+ ) -+ self.assertIsNone(result) -diff --git a/releasenotes/notes/keystone-endpoint-filter-e930a7b72276fa2c.yaml b/releasenotes/notes/keystone-endpoint-filter-e930a7b72276fa2c.yaml -new file mode 100644 -index 0000000..5a633ee ---- /dev/null -+++ b/releasenotes/notes/keystone-endpoint-filter-e930a7b72276fa2c.yaml -@@ -0,0 +1,5 @@ -+--- -+features: -+ - | -+ Add ``endpoint add project``, ``endpoint remove project`` and ``endpoint -+ list`` commands to manage endpoint filters in identity v3. -diff --git a/setup.cfg b/setup.cfg -index 1b8e006..d60657f 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -195,12 +195,15 @@ openstack.identity.v3 = - ec2_credentials_delete = openstackclient.identity.v3.ec2creds:DeleteEC2Creds - ec2_credentials_list = openstackclient.identity.v3.ec2creds:ListEC2Creds - ec2_credentials_show = openstackclient.identity.v3.ec2creds:ShowEC2Creds -- endpoint_create = openstackclient.identity.v3.endpoint:CreateEndpoint -+ -+ endpoint_add_project = openstackclient.identity.v3.endpoint:AddProjectToEndpoint -+ endpoint_create = openstackclient.identity.v3.endpoint:CreateEndpoint - endpoint_delete = openstackclient.identity.v3.endpoint:DeleteEndpoint -+ endpoint_list = openstackclient.identity.v3.endpoint:ListEndpoint -+ endpoint_remove_project = openstackclient.identity.v3.endpoint:RemoveProjectFromEndpoint - endpoint_set = openstackclient.identity.v3.endpoint:SetEndpoint - endpoint_show = openstackclient.identity.v3.endpoint:ShowEndpoint -- endpoint_list = openstackclient.identity.v3.endpoint:ListEndpoint -- group_add_user = openstackclient.identity.v3.group:AddUserToGroup -+ group_add_user = openstackclient.identity.v3.group:AddUserToGroup - group_contains_user = openstackclient.identity.v3.group:CheckUserInGroup - group_create = openstackclient.identity.v3.group:CreateGroup - group_delete = openstackclient.identity.v3.group:DeleteGroup --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0002-US101470-Openstackclient-implementation-of-novaclien.patch b/openstack/python-openstackclient/centos/patches/0002-US101470-Openstackclient-implementation-of-novaclien.patch deleted file mode 100644 index 35b657ea..00000000 --- a/openstack/python-openstackclient/centos/patches/0002-US101470-Openstackclient-implementation-of-novaclien.patch +++ /dev/null @@ -1,273 +0,0 @@ -From 8fe2869469d3b853e24140e4ffb487d672232b1b Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Fri, 5 Jan 2018 15:01:24 -0500 -Subject: [PATCH] US101470 OSC equivalence of nova cli with WRS extension - -CI part2 ---- - openstackclient/compute/v2/server.py | 37 +++++++++++ - openstackclient/compute/v2/server_group.py | 99 ++++++++++++++++++++++++++++-- - setup.cfg | 2 + - 3 files changed, 132 insertions(+), 6 deletions(-) - -diff --git a/openstackclient/compute/v2/server.py b/openstackclient/compute/v2/server.py -index 151c678..c7ffab9 100644 ---- a/openstackclient/compute/v2/server.py -+++ b/openstackclient/compute/v2/server.py -@@ -12,6 +12,13 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -+ - - """Compute v2 Server action implementations""" - -@@ -1714,6 +1721,36 @@ class ResumeServer(command.Command): - ).resume() - - -+# WRS:extension -+class ScaleServer(command.Command): -+ _description = _("Scale server properties") -+ -+ def get_parser(self, prog_name): -+ parser = super(ScaleServer, self).get_parser(prog_name) -+ parser.add_argument( -+ 'server', -+ metavar='', -+ help=_('Name or ID of server'), -+ ) -+ parser.add_argument( -+ 'resource', -+ metavar='', -+ help=_('Resource to scale. Currently only "cpu"'), -+ ) -+ parser.add_argument( -+ 'direction', -+ metavar='', -+ help=_('Direction to scale ("up" or "down")'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ compute_client = self.app.client_manager.compute -+ compute_client.servers.scale(parsed_args.server, -+ parsed_args.resource, -+ parsed_args.direction) -+ -+ - class SetServer(command.Command): - _description = _("Set server properties") - -diff --git a/openstackclient/compute/v2/server_group.py b/openstackclient/compute/v2/server_group.py -index c6e2161..551ed8e 100644 ---- a/openstackclient/compute/v2/server_group.py -+++ b/openstackclient/compute/v2/server_group.py -@@ -12,6 +12,12 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# - - """Compute v2 Server Group action implementations""" - -@@ -22,6 +28,7 @@ from osc_lib import exceptions - from osc_lib import utils - - from openstackclient.i18n import _ -+from novaclient import api_versions - - - LOG = logging.getLogger(__name__) -@@ -35,12 +42,40 @@ _formatters = { - - def _get_columns(info): - columns = list(info.keys()) -- if 'metadata' in columns: -- # NOTE(RuiChen): The metadata of server group is always empty since API -- # compatible, so hide it in order to avoid confusion. -- columns.remove('metadata') - return tuple(sorted(columns)) - -+#WRS:extension -+def _extract_metadata(args): -+ metadata = {} -+ for server_group in args.metadata: -+ for metadatum in server_group: -+ if metadatum.find('=') > -1: -+ (key, value) = metadatum.split('=', 1) -+ else: -+ key = metadatum -+ value = None -+ metadata[key] = value -+ return metadata -+ -+# WRS:extension - type checking for key-value pair -+# returns text instead of tuple like above -+def _key_value_type(text): -+ try: -+ (k, v) = text.split('=', 1) -+ return text -+ except ValueError: -+ msg = "%r is not in the format of key=value" % text -+ raise argparse.ArgumentTypeError(msg) -+ -+ -+# WRS:extension - type checking for CSV key-value pairs -+def _csv_key_value_type(text): -+ try: -+ return map(_key_value_type, text.split(',')) -+ except Exception as e: -+ raise exceptions.CommandError( -+ "Invalid csv key-value argument '%s'. %s" % (text, unicode(e))) -+ - - class CreateServerGroup(command.ShowOne): - _description = _("Create a new server group.") -@@ -52,6 +87,15 @@ class CreateServerGroup(command.ShowOne): - metavar='', - help=_("New server group name") - ) -+ # WRS:extension -+ parser.add_argument( -+ '--metadata', -+ metavar='', -+ action='append', -+ default=[], -+ type=_csv_key_value_type, -+ help=_("Metadata for this server group") -+ ) - parser.add_argument( - '--policy', - metavar='', -@@ -66,17 +110,21 @@ class CreateServerGroup(command.ShowOne): - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute - info = {} -+ -+ #WRS:extension -+ meta = _extract_metadata(parsed_args) -+ compute_client.api_version = api_versions.APIVersion("2.53") - server_group = compute_client.server_groups.create( - name=parsed_args.name, -+ metadata=meta, - policies=[parsed_args.policy]) -- info.update(server_group._info) - -+ info.update(server_group._info) - columns = _get_columns(info) - data = utils.get_dict_properties(info, columns, - formatters=_formatters) - return columns, data - -- - class DeleteServerGroup(command.Command): - _description = _("Delete existing server group(s).") - -@@ -133,8 +181,13 @@ class ListServerGroup(command.Lister): - - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute -+ -+ #WRS:extension -+ compute_client.api_version = api_versions.APIVersion("2.53") -+ - data = compute_client.server_groups.list(parsed_args.all_projects) - -+ #WRS:extension list project_id, user_id fields and metadata fields - if parsed_args.long: - column_headers = columns = ( - 'ID', -@@ -143,12 +196,14 @@ class ListServerGroup(command.Lister): - 'Members', - 'Project Id', - 'User Id', -+ 'Metadata', - ) - else: - column_headers = columns = ( - 'ID', - 'Name', - 'Policies', -+ 'Metadata', - ) - - return (column_headers, -@@ -175,11 +230,43 @@ class ShowServerGroup(command.ShowOne): - - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute -+ #WRS:extension -+ compute_client.api_version = api_versions.APIVersion("2.53") -+ - group = utils.find_resource(compute_client.server_groups, - parsed_args.server_group) -+ - info = {} - info.update(group._info) - columns = _get_columns(info) - data = utils.get_dict_properties(info, columns, - formatters=_formatters) - return columns, data -+ -+#WRS:extension -+class SetServerGroupMetadata(command.Command): -+ _description = _("Set metadata of a server group") -+ -+ def get_parser(self, prog_name): -+ parser = super(SetServerGroupMetadata, self).get_parser(prog_name) -+ parser.add_argument( -+ 'id', -+ metavar='', -+ help=_("Unique ID of the server group") -+ ) -+ parser.add_argument( -+ 'metadata', -+ metavar='', -+ action='append', -+ default=[], -+ type=_csv_key_value_type, -+ help=_("Metadata to set/unset") -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ compute_client = self.app.client_manager.compute -+ metadata = _extract_metadata(parsed_args) -+ compute_client.api_version = api_versions.APIVersion("2.53") -+ compute_client.server_groups.set_metadata(parsed_args.id, metadata) -+ -diff --git a/setup.cfg b/setup.cfg -index f162417..627ff87 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -110,6 +110,7 @@ openstack.compute.v2 = - server_resize = openstackclient.compute.v2.server:ResizeServer - server_restore = openstackclient.compute.v2.server:RestoreServer - server_resume = openstackclient.compute.v2.server:ResumeServer -+ server_scale = openstackclient.compute.v2.server:ScaleServer - server_set = openstackclient.compute.v2.server:SetServer - server_shelve = openstackclient.compute.v2.server:ShelveServer - server_show = openstackclient.compute.v2.server:ShowServer -@@ -129,6 +130,7 @@ openstack.compute.v2 = - server_group_create = openstackclient.compute.v2.server_group:CreateServerGroup - server_group_delete = openstackclient.compute.v2.server_group:DeleteServerGroup - server_group_list = openstackclient.compute.v2.server_group:ListServerGroup -+ server_group_set_metadata = openstackclient.compute.v2.server_group:SetServerGroupMetadata - server_group_show = openstackclient.compute.v2.server_group:ShowServerGroup - server_image_create = openstackclient.compute.v2.server_image:CreateServerImage - usage_list = openstackclient.compute.v2.usage:ListUsage --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0002-US106901-Openstack-CLI-Adoption.patch b/openstack/python-openstackclient/centos/patches/0002-US106901-Openstack-CLI-Adoption.patch deleted file mode 100644 index e4598a6f..00000000 --- a/openstack/python-openstackclient/centos/patches/0002-US106901-Openstack-CLI-Adoption.patch +++ /dev/null @@ -1,330 +0,0 @@ -From c4f2db9901b54217e1737987a19a8b48209f40ab Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Mon, 5 Feb 2018 14:06:32 -0500 -Subject: [PATCH 1/1] US106901 Openstack CLI Adoption: Cinder/Glance/Ceilometer - - CI partII: OSC equivalence of cinder cli with WRS extension ---- - openstackclient/volume/v1/volume.py | 58 ++++++++++++++++++++++++++++ - openstackclient/volume/v1/volume_snapshot.py | 26 +++++++++++++ - openstackclient/volume/v2/volume.py | 57 +++++++++++++++++++++++++++ - openstackclient/volume/v2/volume_snapshot.py | 27 +++++++++++++ - setup.cfg | 11 +++++- - 5 files changed, 178 insertions(+), 1 deletion(-) - -diff --git a/openstackclient/volume/v1/volume.py b/openstackclient/volume/v1/volume.py -index b29429e..85caf3e 100644 ---- a/openstackclient/volume/v1/volume.py -+++ b/openstackclient/volume/v1/volume.py -@@ -12,6 +12,13 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# -+ - - """Volume v1 Volume action implementations""" - -@@ -25,6 +32,7 @@ from osc_lib import utils - import six - - from openstackclient.i18n import _ -+from cinderclient import utils as cinder_utils - - - LOG = logging.getLogger(__name__) -@@ -624,3 +632,53 @@ class UnsetVolume(command.Command): - volume.id, - parsed_args.property, - ) -+ -+ -+# WRS extension -+class ExportVolume(command.Command): -+ _description = _("Export volume to a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ExportVolume, self).get_parser(prog_name) -+ parser.add_argument( -+ 'volume', -+ metavar='', -+ help=_('Name or ID of the volume to export'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ volume = utils.find_resource( -+ volume_client.volumes, parsed_args.volume) -+ volume_client.volumes.export(volume) -+ -+ -+# WRS extension -+class ImportVolume(command.Command): -+ _description = _("Import a volume from a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ImportVolume, self).get_parser(prog_name) -+ parser.add_argument( -+ 'file_name', -+ metavar='', -+ help=_('Name of the file to import'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ -+ # Parse the volume ID from the filename which is in this format: -+ # volume--.tgz -+ if(parsed_args.file_name.find("volume-") != 0 or -+ parsed_args.file_name.rfind(".tgz") == -1 or -+ len(parsed_args.file_name) < 28): -+ raise exceptions.CommandError( -+ "Invalid filename - volume files must have the following format: " -+ "volume--.tgz") -+ -+ volume_id = parsed_args.file_name[7:-20] -+ volume = cinder_utils.find_volume(volume_client, volume_id) -+ volume_client.volumes.import_volume(volume, parsed_args.file_name) -diff --git a/openstackclient/volume/v1/volume_snapshot.py b/openstackclient/volume/v1/volume_snapshot.py -index 3e83da5..a4d44a8 100644 ---- a/openstackclient/volume/v1/volume_snapshot.py -+++ b/openstackclient/volume/v1/volume_snapshot.py -@@ -12,6 +12,12 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# - - """Volume v1 Snapshot action implementations""" - -@@ -25,6 +31,7 @@ from osc_lib import utils - import six - - from openstackclient.i18n import _ -+from cinderclient import utils as cinder_utils - - - LOG = logging.getLogger(__name__) -@@ -352,3 +359,22 @@ class UnsetVolumeSnapshot(command.Command): - snapshot.id, - parsed_args.property, - ) -+ -+# WRS extension -+class ExportVolumeSnapshot(command.Command): -+ _description = _("Export a snapshot to a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ExportVolumeSnapshot, self).get_parser(prog_name) -+ parser.add_argument( -+ 'snapshot', -+ metavar='', -+ help=_('Name or ID of the snapshot to export'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ snapshot = cinder_utils.find_resource( -+ volume_client.volume_snapshots, parsed_args.snapshot) -+ volume_client.volume_snapshots.export(snapshot) -diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py -index 61f846b..c2ea7a4 100644 ---- a/openstackclient/volume/v2/volume.py -+++ b/openstackclient/volume/v2/volume.py -@@ -11,6 +11,12 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# - - """Volume V2 Volume action implementations""" - -@@ -25,6 +31,7 @@ import six - - from openstackclient.i18n import _ - from openstackclient.identity import common as identity_common -+from cinderclient import utils as cinder_utils - - - LOG = logging.getLogger(__name__) -@@ -784,3 +791,53 @@ class UnsetVolume(command.Command): - if result > 0: - raise exceptions.CommandError(_("One or more of the " - "unset operations failed")) -+ -+ -+# WRS extension -+class ExportVolume(command.Command): -+ _description = _("Export volume to a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ExportVolume, self).get_parser(prog_name) -+ parser.add_argument( -+ 'volume', -+ metavar='', -+ help=_('Name or ID of the volume to export'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ volume = cinder_utils.find_resource( -+ volume_client.volumes, parsed_args.volume) -+ volume_client.volumes.export(volume) -+ -+ -+# WRS extension -+class ImportVolume(command.Command): -+ _description = _("Import a volume from a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ImportVolume, self).get_parser(prog_name) -+ parser.add_argument( -+ 'file_name', -+ metavar='', -+ help=_('Name of the file to import'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ -+ # Parse the volume ID from the filename which is in this format: -+ # volume--.tgz -+ if(parsed_args.file_name.find("volume-") != 0 or -+ parsed_args.file_name.rfind(".tgz") == -1 or -+ len(parsed_args.file_name) < 28): -+ raise exceptions.CommandError( -+ "Invalid filename - volume files must have the following format: " -+ "volume--.tgz") -+ -+ volume_id = parsed_args.file_name[7:-20] -+ volume = cinder_utils.find_volume(volume_client, volume_id) -+ volume_client.volumes.import_volume(volume, parsed_args.file_name) -diff --git a/openstackclient/volume/v2/volume_snapshot.py b/openstackclient/volume/v2/volume_snapshot.py -index fe96941..704ef75 100644 ---- a/openstackclient/volume/v2/volume_snapshot.py -+++ b/openstackclient/volume/v2/volume_snapshot.py -@@ -11,6 +11,12 @@ - # License for the specific language governing permissions and limitations - # under the License. - # -+# Copyright (c) 2013-2018 Wind River Systems, Inc. -+# SPDX-License-Identifier: Apache-2.0 -+# -+# -+# -+# - - """Volume v2 snapshot action implementations""" - -@@ -25,6 +31,7 @@ import six - - from openstackclient.i18n import _ - from openstackclient.identity import common as identity_common -+from cinderclient import utils as cinder_utils - - - LOG = logging.getLogger(__name__) -@@ -437,3 +444,23 @@ class UnsetVolumeSnapshot(command.Command): - snapshot.id, - parsed_args.property, - ) -+ -+ -+# WRS extension -+class ExportVolumeSnapshot(command.Command): -+ _description = _("Export a snapshot to a file.") -+ -+ def get_parser(self, prog_name): -+ parser = super(ExportVolumeSnapshot, self).get_parser(prog_name) -+ parser.add_argument( -+ 'snapshot', -+ metavar='', -+ help=_('Name or ID of the snapshot to export'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ volume_client = self.app.client_manager.volume -+ snapshot = cinder_utils.find_resource( -+ volume_client.volume_snapshots, parsed_args.snapshot) -+ volume_client.volume_snapshots.export(snapshot) -diff --git a/setup.cfg b/setup.cfg -index 627ff87..11f7261 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -468,6 +468,8 @@ openstack.volume.v1 = - snapshot_unset = openstackclient.volume.v1.snapshot:UnsetSnapshot - volume_create = openstackclient.volume.v1.volume:CreateVolume - volume_delete = openstackclient.volume.v1.volume:DeleteVolume -+ volume_export = openstackclient.volume.v1.volume:ExportVolume -+ volume_import = openstackclient.volume.v1.volume:ImportVolume - volume_list = openstackclient.volume.v1.volume:ListVolume - volume_migrate = openstackclient.volume.v1.volume:MigrateVolume - volume_set = openstackclient.volume.v1.volume:SetVolume -@@ -480,6 +482,7 @@ openstack.volume.v1 = - volume_backup_show = openstackclient.volume.v1.backup:ShowVolumeBackup - volume_snapshot_create = openstackclient.volume.v1.volume_snapshot:CreateVolumeSnapshot - volume_snapshot_delete = openstackclient.volume.v1.volume_snapshot:DeleteVolumeSnapshot -+ volume_snapshot_export = openstackclient.volume.v1.volume_snapshot:ExportVolumeSnapshot - volume_snapshot_list = openstackclient.volume.v1.volume_snapshot:ListVolumeSnapshot - volume_snapshot_set = openstackclient.volume.v1.volume_snapshot:SetVolumeSnapshot - volume_snapshot_show = openstackclient.volume.v1.volume_snapshot:ShowVolumeSnapshot -@@ -529,7 +532,9 @@ openstack.volume.v2 = - snapshot_show = openstackclient.volume.v2.snapshot:ShowSnapshot - snapshot_unset = openstackclient.volume.v2.snapshot:UnsetSnapshot - volume_create = openstackclient.volume.v2.volume:CreateVolume -- volume_delete = openstackclient.volume.v2.volume:DeleteVolume -+ volume_delete = openstackclient.volume.v2.volume:DeleteVolume -+ volume_export = openstackclient.volume.v2.volume:ExportVolume -+ volume_import = openstackclient.volume.v2.volume:ImportVolume - volume_list = openstackclient.volume.v2.volume:ListVolume - volume_migrate = openstackclient.volume.v2.volume:MigrateVolume - volume_set = openstackclient.volume.v2.volume:SetVolume -@@ -545,6 +550,7 @@ openstack.volume.v2 = - volume_host_set = openstackclient.volume.v2.volume_host:SetVolumeHost - volume_snapshot_create = openstackclient.volume.v2.volume_snapshot:CreateVolumeSnapshot - volume_snapshot_delete = openstackclient.volume.v2.volume_snapshot:DeleteVolumeSnapshot -+ volume_snapshot_export = openstackclient.volume.v2.volume_snapshot:ExportVolumeSnapshot - volume_snapshot_list = openstackclient.volume.v2.volume_snapshot:ListVolumeSnapshot - volume_snapshot_set = openstackclient.volume.v2.volume_snapshot:SetVolumeSnapshot - volume_snapshot_show = openstackclient.volume.v2.volume_snapshot:ShowVolumeSnapshot -@@ -584,6 +590,8 @@ openstack.volume.v3 = - consistency_group_snapshot_show = openstackclient.volume.v2.consistency_group_snapshot:ShowConsistencyGroupSnapshot - volume_create = openstackclient.volume.v2.volume:CreateVolume - volume_delete = openstackclient.volume.v2.volume:DeleteVolume -+ volume_export = openstackclient.volume.v2.volume:ExportVolume -+ volume_import = openstackclient.volume.v2.volume:ImportVolume - volume_list = openstackclient.volume.v2.volume:ListVolume - volume_migrate = openstackclient.volume.v2.volume:MigrateVolume - volume_set = openstackclient.volume.v2.volume:SetVolume -@@ -598,6 +606,7 @@ openstack.volume.v3 = - volume_host_set = openstackclient.volume.v2.volume_host:SetVolumeHost - volume_snapshot_create = openstackclient.volume.v2.volume_snapshot:CreateVolumeSnapshot - volume_snapshot_delete = openstackclient.volume.v2.volume_snapshot:DeleteVolumeSnapshot -+ volume_snapshot_export = openstackclient.volume.v2.volume_snapshot:ExportVolumeSnapshot - volume_snapshot_list = openstackclient.volume.v2.volume_snapshot:ListVolumeSnapshot - volume_snapshot_set = openstackclient.volume.v2.volume_snapshot:SetVolumeSnapshot - volume_snapshot_show = openstackclient.volume.v2.volume_snapshot:ShowVolumeSnapshot --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/0003-Add-support-for-endpoint-group-commands.patch b/openstack/python-openstackclient/centos/patches/0003-Add-support-for-endpoint-group-commands.patch deleted file mode 100644 index 29094ffa..00000000 --- a/openstack/python-openstackclient/centos/patches/0003-Add-support-for-endpoint-group-commands.patch +++ /dev/null @@ -1,472 +0,0 @@ -From d800b1821e4aa3e3e49173be6c5b1ea370200d96 Mon Sep 17 00:00:00 2001 -From: Jose Castro Leon -Date: Wed, 25 Oct 2017 15:39:44 +0200 -Subject: [PATCH] Add support for endpoint group commands - -Implements the commands for endpoint group filter management. -Includes the CRUD management of the endpoint groups and the -association management between them and the projects that are -using this method. - -Implements: blueprint keystone-endpoint-filter -Change-Id: I4265f7f8598d028191e90d76781b7b6ece6fef64 - -Signed-off-by: Kam Nasim ---- - doc/source/cli/command-objects/endpoint_group.rst | 28 ++ - doc/source/cli/commands.rst | 1 + - openstackclient/identity/v3/endpoint_group.py | 324 +++++++++++++++++++++ - openstackclient/tests/unit/identity/v3/fakes.py | 16 + - .../keystone-endpoint-group-0c55debbb66844f2.yaml | 7 + - setup.cfg | 9 + - 6 files changed, 385 insertions(+) - create mode 100644 doc/source/cli/command-objects/endpoint_group.rst - create mode 100644 openstackclient/identity/v3/endpoint_group.py - create mode 100644 releasenotes/notes/keystone-endpoint-group-0c55debbb66844f2.yaml - -diff --git a/doc/source/cli/command-objects/endpoint_group.rst b/doc/source/cli/command-objects/endpoint_group.rst -new file mode 100644 -index 0000000..ccfe5f6 ---- /dev/null -+++ b/doc/source/cli/command-objects/endpoint_group.rst -@@ -0,0 +1,28 @@ -+============== -+endpoint group -+============== -+ -+A **endpoint group** is used to create groups of endpoints that then -+can be used to filter the endpoints that are available to a project. -+Applicable to Identity v3 -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group add project -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group create -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group delete -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group list -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group remove project -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group set -+ -+.. autoprogram-cliff:: openstack.identity.v3 -+ :command: endpoint group show -diff --git a/doc/source/cli/commands.rst b/doc/source/cli/commands.rst -index 5a7977e..50a6f6e 100644 ---- a/doc/source/cli/commands.rst -+++ b/doc/source/cli/commands.rst -@@ -91,6 +91,7 @@ referring to both Compute and Volume quotas. - * ``domain``: (**Identity**) a grouping of projects - * ``ec2 credentials``: (**Identity**) AWS EC2-compatible credentials - * ``endpoint``: (**Identity**) the base URL used to contact a specific service -+* ``endpoint group``: (**Identity**) group endpoints to be used as filters - * ``extension``: (**Compute**, **Identity**, **Network**, **Volume**) OpenStack server API extensions - * ``federation protocol``: (**Identity**) the underlying protocol used while federating identities - * ``flavor``: (**Compute**) predefined server configurations: ram, root disk and so on -diff --git a/openstackclient/identity/v3/endpoint_group.py b/openstackclient/identity/v3/endpoint_group.py -new file mode 100644 -index 0000000..e254973 ---- /dev/null -+++ b/openstackclient/identity/v3/endpoint_group.py -@@ -0,0 +1,324 @@ -+# 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. -+# -+ -+"""Identity v3 Endpoint Group action implementations""" -+ -+import json -+import logging -+ -+from osc_lib.command import command -+from osc_lib import exceptions -+from osc_lib import utils -+import six -+ -+from openstackclient.i18n import _ -+from openstackclient.identity import common -+ -+ -+LOG = logging.getLogger(__name__) -+ -+ -+class _FiltersReader(object): -+ _description = _("Helper class capable of reading filters from files") -+ -+ def _read_filters(self, path): -+ """Read and parse rules from path -+ -+ Expect the file to contain a valid JSON structure. -+ -+ :param path: path to the file -+ :return: loaded and valid dictionary with filters -+ :raises exception.CommandError: In case the file cannot be -+ accessed or the content is not a valid JSON. -+ -+ Example of the content of the file: -+ { -+ "interface": "admin", -+ "service_id": "1b501a" -+ } -+ """ -+ blob = utils.read_blob_file_contents(path) -+ try: -+ rules = json.loads(blob) -+ except ValueError as e: -+ msg = _("An error occurred when reading filters from file " -+ "%(path)s: %(error)s") % {"path": path, "error": e} -+ raise exceptions.CommandError(msg) -+ else: -+ return rules -+ -+ -+class AddProjectToEndpointGroup(command.Command): -+ _description = _("Add a project to an endpoint group") -+ -+ def get_parser(self, prog_name): -+ parser = super( -+ AddProjectToEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpointgroup', -+ metavar='', -+ help=_('Endpoint group (name or ID)'), -+ ) -+ parser.add_argument( -+ 'project', -+ metavar='', -+ help=_('Project to associate (name or ID)'), -+ ) -+ common.add_project_domain_option_to_parser(parser) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.identity -+ -+ endpointgroup = utils.find_resource(client.endpoint_groups, -+ parsed_args.endpointgroup) -+ -+ project = common.find_project(client, -+ parsed_args.project, -+ parsed_args.project_domain) -+ -+ client.endpoint_filter.add_endpoint_group_to_project( -+ endpoint_group=endpointgroup.id, -+ project=project.id) -+ -+ -+class CreateEndpointGroup(command.ShowOne, _FiltersReader): -+ _description = _("Create new endpoint group") -+ -+ def get_parser(self, prog_name): -+ parser = super(CreateEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'name', -+ metavar='', -+ help=_('Name of the endpoint group'), -+ ) -+ parser.add_argument( -+ 'filters', -+ metavar='', -+ help=_('Filename that contains a new set of filters'), -+ ) -+ parser.add_argument( -+ '--description', -+ help=_('Description of the endpoint group'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ identity_client = self.app.client_manager.identity -+ -+ filters = None -+ if parsed_args.filters: -+ filters = self._read_filters(parsed_args.filters) -+ -+ endpoint_group = identity_client.endpoint_groups.create( -+ name=parsed_args.name, -+ filters=filters, -+ description=parsed_args.description -+ ) -+ -+ info = {} -+ endpoint_group._info.pop('links') -+ info.update(endpoint_group._info) -+ return zip(*sorted(six.iteritems(info))) -+ -+ -+class DeleteEndpointGroup(command.Command): -+ _description = _("Delete endpoint group(s)") -+ -+ def get_parser(self, prog_name): -+ parser = super(DeleteEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpointgroup', -+ metavar='', -+ nargs='+', -+ help=_('Endpoint group(s) to delete (name or ID)'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ identity_client = self.app.client_manager.identity -+ result = 0 -+ for i in parsed_args.endpointgroup: -+ try: -+ endpoint_id = utils.find_resource( -+ identity_client.endpoint_groups, i).id -+ identity_client.endpoint_groups.delete(endpoint_id) -+ except Exception as e: -+ result += 1 -+ LOG.error(_("Failed to delete endpoint group with " -+ "ID '%(endpointgroup)s': %(e)s"), -+ {'endpointgroup': i, 'e': e}) -+ -+ if result > 0: -+ total = len(parsed_args.endpointgroup) -+ msg = (_("%(result)s of %(total)s endpointgroups failed " -+ "to delete.") % {'result': result, 'total': total}) -+ raise exceptions.CommandError(msg) -+ -+ -+class ListEndpointGroup(command.Lister): -+ _description = _("List endpoint groups") -+ -+ def get_parser(self, prog_name): -+ parser = super(ListEndpointGroup, self).get_parser(prog_name) -+ list_group = parser.add_mutually_exclusive_group() -+ list_group.add_argument( -+ '--endpointgroup', -+ metavar='', -+ help=_('Endpoint Group (name or ID)'), -+ ) -+ list_group.add_argument( -+ '--project', -+ metavar='', -+ help=_('Project (name or ID)'), -+ ) -+ parser.add_argument( -+ '--domain', -+ metavar='', -+ help=_('Domain owning (name or ID)'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.identity -+ -+ endpointgroup = None -+ if parsed_args.endpointgroup: -+ endpointgroup = utils.find_resource(client.endpoint_groups, -+ parsed_args.endpointgroup) -+ project = None -+ if parsed_args.project: -+ project = common.find_project(client, -+ parsed_args.project, -+ parsed_args.domain) -+ -+ if endpointgroup: -+ # List projects associated to the endpoint group -+ columns = ('ID', 'Name') -+ data = client.endpoint_filter.list_projects_for_endpoint_group( -+ endpoint_group=endpointgroup.id) -+ elif project: -+ columns = ('ID', 'Name') -+ data = client.endpoint_filter.list_endpoint_groups_for_project( -+ project=project.id) -+ else: -+ columns = ('ID', 'Name', 'Description') -+ data = client.endpoint_groups.list() -+ -+ return (columns, -+ (utils.get_item_properties( -+ s, columns, -+ formatters={}, -+ ) for s in data)) -+ -+ -+class RemoveProjectFromEndpointGroup(command.Command): -+ _description = _("Remove project from endpoint group") -+ -+ def get_parser(self, prog_name): -+ parser = super( -+ RemoveProjectFromEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpointgroup', -+ metavar='', -+ help=_('Endpoint group (name or ID)'), -+ ) -+ parser.add_argument( -+ 'project', -+ metavar='', -+ help=_('Project to remove (name or ID)'), -+ ) -+ common.add_project_domain_option_to_parser(parser) -+ return parser -+ -+ def take_action(self, parsed_args): -+ client = self.app.client_manager.identity -+ -+ endpointgroup = utils.find_resource(client.endpoint_groups, -+ parsed_args.endpointgroup) -+ -+ project = common.find_project(client, -+ parsed_args.project, -+ parsed_args.project_domain) -+ -+ client.endpoint_filter.delete_endpoint_group_to_project( -+ endpoint_group=endpointgroup.id, -+ project=project.id) -+ -+ -+class SetEndpointGroup(command.Command, _FiltersReader): -+ _description = _("Set endpoint group properties") -+ -+ def get_parser(self, prog_name): -+ parser = super(SetEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpointgroup', -+ metavar='', -+ help=_('Endpoint Group to modify (name or ID)'), -+ ) -+ parser.add_argument( -+ '--name', -+ metavar='', -+ help=_('New enpoint group name'), -+ ) -+ parser.add_argument( -+ '--filters', -+ metavar='', -+ help=_('Filename that contains a new set of filters'), -+ ) -+ parser.add_argument( -+ '--description', -+ metavar='', -+ default='', -+ help=_('New endpoint group description'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ identity_client = self.app.client_manager.identity -+ endpointgroup = utils.find_resource(identity_client.endpoint_groups, -+ parsed_args.endpointgroup) -+ -+ filters = None -+ if parsed_args.filters: -+ filters = self._read_filters(parsed_args.filters) -+ -+ identity_client.endpoint_groups.update( -+ endpointgroup.id, -+ name=parsed_args.name, -+ filters=filters, -+ description=parsed_args.description -+ ) -+ -+ -+class ShowEndpointGroup(command.ShowOne): -+ _description = _("Display endpoint group details") -+ -+ def get_parser(self, prog_name): -+ parser = super(ShowEndpointGroup, self).get_parser(prog_name) -+ parser.add_argument( -+ 'endpointgroup', -+ metavar='', -+ help=_('Endpoint group (name or ID)'), -+ ) -+ return parser -+ -+ def take_action(self, parsed_args): -+ identity_client = self.app.client_manager.identity -+ endpoint_group = utils.find_resource(identity_client.endpoint_groups, -+ parsed_args.endpointgroup) -+ -+ info = {} -+ endpoint_group._info.pop('links') -+ info.update(endpoint_group._info) -+ return zip(*sorted(six.iteritems(info))) -diff --git a/openstackclient/tests/unit/identity/v3/fakes.py b/openstackclient/tests/unit/identity/v3/fakes.py -index 549a1aa..76431b1 100644 ---- a/openstackclient/tests/unit/identity/v3/fakes.py -+++ b/openstackclient/tests/unit/identity/v3/fakes.py -@@ -221,6 +221,20 @@ ENDPOINT = { - 'links': base_url + 'endpoints/' + endpoint_id, - } - -+endpoint_group_id = 'eg-123' -+endpoint_group_description = 'eg 123 description' -+endpoint_group_filters = { -+ 'service_id': service_id, -+ 'region_id': endpoint_region, -+} -+ -+ENDPOINT_GROUP = { -+ 'id': endpoint_group_id, -+ 'filters': endpoint_group_filters, -+ 'description': endpoint_group_description, -+ 'links': base_url + 'endpoint_groups/' + endpoint_group_id, -+} -+ - user_id = 'bbbbbbb-aaaa-aaaa-aaaa-bbbbbbbaaaa' - user_name = 'paul' - user_description = 'Sir Paul' -@@ -493,6 +507,8 @@ class FakeIdentityv3Client(object): - self.endpoints.resource_class = fakes.FakeResource(None, {}) - self.endpoint_filter = mock.Mock() - self.endpoint_filter.resource_class = fakes.FakeResource(None, {}) -+ self.endpoint_groups = mock.Mock() -+ self.endpoint_groups.resource_class = fakes.FakeResource(None, {}) - self.groups = mock.Mock() - self.groups.resource_class = fakes.FakeResource(None, {}) - self.oauth1 = mock.Mock() -diff --git a/releasenotes/notes/keystone-endpoint-group-0c55debbb66844f2.yaml b/releasenotes/notes/keystone-endpoint-group-0c55debbb66844f2.yaml -new file mode 100644 -index 0000000..dc3c5be ---- /dev/null -+++ b/releasenotes/notes/keystone-endpoint-group-0c55debbb66844f2.yaml -@@ -0,0 +1,7 @@ -+--- -+features: -+ - | -+ Add endpoint group commands: ``endpoint group add project``, ``endpoint group create``, -+ ``endpoint group delete``, ``endpoint group list``, ``endpoint group remove project``, -+ ``endpoint group set`` and ``endpoint group show``. -+ [Blueprint `keystone-endpoint-filter `_] -diff --git a/setup.cfg b/setup.cfg -index 5f9c04a..d87b387 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -202,6 +202,15 @@ openstack.identity.v3 = - endpoint_remove_project = openstackclient.identity.v3.endpoint:RemoveProjectFromEndpoint - endpoint_set = openstackclient.identity.v3.endpoint:SetEndpoint - endpoint_show = openstackclient.identity.v3.endpoint:ShowEndpoint -+ -+ endpoint_group_add_project = openstackclient.identity.v3.endpoint_group:AddProjectToEndpointGroup -+ endpoint_group_create = openstackclient.identity.v3.endpoint_group:CreateEndpointGroup -+ endpoint_group_delete = openstackclient.identity.v3.endpoint_group:DeleteEndpointGroup -+ endpoint_group_list = openstackclient.identity.v3.endpoint_group:ListEndpointGroup -+ endpoint_group_remove_project = openstackclient.identity.v3.endpoint_group:RemoveProjectFromEndpointGroup -+ endpoint_group_set = openstackclient.identity.v3.endpoint_group:SetEndpointGroup -+ endpoint_group_show = openstackclient.identity.v3.endpoint_group:ShowEndpointGroup -+ - group_add_user = openstackclient.identity.v3.group:AddUserToGroup - group_contains_user = openstackclient.identity.v3.group:CheckUserInGroup - group_create = openstackclient.identity.v3.group:CreateGroup --- -1.8.3.1 - diff --git a/openstack/python-openstackclient/centos/patches/CGTS-7814-warning-only-when-the-admin-password-chang.patch b/openstack/python-openstackclient/centos/patches/CGTS-7814-warning-only-when-the-admin-password-chang.patch deleted file mode 100644 index b2dfb0e5..00000000 --- a/openstack/python-openstackclient/centos/patches/CGTS-7814-warning-only-when-the-admin-password-chang.patch +++ /dev/null @@ -1,42 +0,0 @@ -From a2f2306ae12c65d0758a63781ace5d3e6cf0df7f Mon Sep 17 00:00:00 2001 -From: jmckenna -Date: Fri, 6 Oct 2017 10:40:12 -0400 -Subject: [PATCH] [PATCH] CGTS-7814: warning only when the admin password - change accepted - -Currently admin password change CLI warning coming even when new -Password Change is not accepted. The patch fixed this by moving -the warning from keystoneclient to openstackclienti, after the -password update call. - -diff --git a/openstackclient/identity/v3/user.py b/openstackclient/identity/v3/user.py -index 201d217..e94ec1f 100644 ---- a/openstackclient/identity/v3/user.py -+++ b/openstackclient/identity/v3/user.py -@@ -392,7 +392,7 @@ class SetUser(command.Command): - kwargs['enabled'] = False - - identity_client.users.update(user.id, **kwargs) -- if user.name == 'admin' : -+ if user.name == 'admin' and 'password' in kwargs : - print("Warning: '%s' password changed. Please wait 5 minutes " - "before Locking/Unlocking the controllers for the password " - "change to come into effect\n" %(user.name)) -@@ -456,6 +456,17 @@ class SetPasswordUser(command.Command): - - identity_client.users.update_password(current_password, password) - -+ # retrieve the authentication information from the cached token session -+ session_auth = identity_client.session.auth -+ username = "" -+ if "username" in session_auth.__dict__: -+ username = session_auth.username -+ elif "_username" in session_auth.__dict__: -+ username = session_auth._username -+ if username == 'admin' : -+ print("Warning: '%s' password changed. Please wait 5 minutes " -+ "before Locking/Unlocking the controllers for the password " -+ "change to come into effect\n" %(username)) - - class ShowUser(command.ShowOne): - _description = _("Display user details") diff --git a/openstack/python-openstackclient/centos/patches/openstackClient_Passwordchange_warning.patch b/openstack/python-openstackclient/centos/patches/openstackClient_Passwordchange_warning.patch deleted file mode 100644 index a226b0df..00000000 --- a/openstack/python-openstackclient/centos/patches/openstackClient_Passwordchange_warning.patch +++ /dev/null @@ -1,22 +0,0 @@ -From be8b4cdf2939d5cd2bf3f2a38534f0d760f63413 Mon Sep 17 00:00:00 2001 -From: jmckenna -Date: Fri, 6 Oct 2017 10:38:33 -0400 -Subject: [PATCH] CGTS-6766: Openstack client logging a warning message when - 'admin' user password is changed using 'openstack user set'CLI command - - -diff --git a/openstackclient/identity/v3/user.py b/openstackclient/identity/v3/user.py -index 5f4fb54..201d217 100644 ---- a/openstackclient/identity/v3/user.py -+++ b/openstackclient/identity/v3/user.py -@@ -392,6 +392,10 @@ class SetUser(command.Command): - kwargs['enabled'] = False - - identity_client.users.update(user.id, **kwargs) -+ if user.name == 'admin' : -+ print("Warning: '%s' password changed. Please wait 5 minutes " -+ "before Locking/Unlocking the controllers for the password " -+ "change to come into effect\n" %(user.name)) - - - class SetPasswordUser(command.Command): diff --git a/openstack/python-openstackclient/centos/python-openstackclient.spec b/openstack/python-openstackclient/centos/python-openstackclient.spec new file mode 100644 index 00000000..60b969fc --- /dev/null +++ b/openstack/python-openstackclient/centos/python-openstackclient.spec @@ -0,0 +1,304 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +# Python3 support in OpenStack starts with version 3.5, +# which is only in Fedora 24+ +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +%global client openstackclient +%global with_doc 0 +%global with_check 0 + +%global common_desc \ +python-openstackclient is a unified command-line client for the OpenStack APIs. \ +It is a thin wrapper to the stock python-*client modules that implement the \ +actual REST API client actions. + +Name: python-openstackclient +Version: 3.16.2 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: OpenStack Command-line Client + +License: ASL 2.0 +URL: http://launchpad.net/%{name} +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros + +%description +%{common_desc} + +%package -n python2-%{client} +Summary: OpenStack Command-line Client +%{?python_provide:%python_provide python2-%{client}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-pbr +BuildRequires: python2-six +BuildRequires: python2-oslo-i18n +BuildRequires: python2-oslo-utils +BuildRequires: python2-requests +BuildRequires: python2-glanceclient +BuildRequires: python2-keystoneclient +BuildRequires: python2-novaclient +BuildRequires: python2-cinderclient +BuildRequires: python2-mock +BuildRequires: python2-os-client-config +%if 0%{?fedora} > 0 +BuildRequires: python2-d2to1 +BuildRequires: python2-cliff +BuildRequires: python2-simplejson +BuildRequires: python2-requests-mock +%else +BuildRequires: python-d2to1 +BuildRequires: python-cliff +BuildRequires: python-simplejson +BuildRequires: python-requests-mock +%endif +# Required to compile translation files +BuildRequires: python2-babel +# Required for unit tests +BuildRequires: python2-os-testr +BuildRequires: python2-osc-lib-tests +BuildRequires: python2-fixtures +BuildRequires: python2-oslotest +BuildRequires: python2-reno +BuildRequires: python2-requestsexceptions +BuildRequires: python2-openstacksdk +BuildRequires: python2-osprofiler + +Requires: python2-pbr +Requires: python2-babel +Requires: python2-openstacksdk >= 0.11.2 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-glanceclient >= 1:2.8.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-keystoneclient >= 1:3.17.0 +Requires: python2-novaclient >= 9.1.0 +Requires: python2-cinderclient >= 3.3.0 +Requires: python2-neutronclient >= 6.7.0 +Requires: python2-six >= 1.10.0 +Requires: python2-osc-lib >= 1.10.0 +%if 0%{?fedora} > 0 +Requires: python2-cliff +%else +Requires: python-cliff +%endif +Requires: python-%{client}-lang = %{version}-%{release} + + +%description -n python2-%{client} +%{common_desc} + +%if 0%{?with_doc} +%package -n python-%{client}-doc +Summary: Documentation for OpenStack Command-line Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-sphinxcontrib-apidoc + +Requires: %{name} = %{version}-%{release} + +%description -n python-%{client}-doc +%{common_desc} + +This package contains auto-generated documentation. +%endif + +%package -n python-%{client}-lang +Summary: Translation files for Openstackclient + +%description -n python-%{client}-lang +Translation files for Openstackclient + +%if 0%{?with_python3} +%package -n python3-%{client} +Summary: OpenStack Command-line Client +%{?python_provide:%python_provide python3-%{client}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-d2to1 +BuildRequires: python3-oslo-sphinx +BuildRequires: python3-six +BuildRequires: python3-cliff +BuildRequires: python3-oslo-i18n +BuildRequires: python3-oslo-utils +BuildRequires: python3-simplejson +BuildRequires: python3-requests +BuildRequires: python3-glanceclient +BuildRequires: python3-keystoneclient +BuildRequires: python3-novaclient +BuildRequires: python3-cinderclient +BuildRequires: python3-mock +BuildRequires: python3-requests-mock +BuildRequires: python3-os-client-config +# Required to compile translation files +BuildRequires: python3-babel +# Required for unit tests +BuildRequires: python3-os-testr +BuildRequires: python3-osc-lib-tests +BuildRequires: python3-coverage +BuildRequires: python3-fixtures +BuildRequires: python3-oslotest +BuildRequires: python3-reno +BuildRequires: python3-requestsexceptions +BuildRequires: python3-openstacksdk +BuildRequires: python3-osprofiler + +Requires: python3-pbr +Requires: python3-babel +Requires: python3-cliff +Requires: python3-openstacksdk >= 0.11.2 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-glanceclient >= 1:2.8.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keystoneclient >= 1:3.17.0 +Requires: python3-novaclient >= 9.1.0 +Requires: python3-cinderclient >= 3.3.0 +Requires: python3-neutronclient >= 6.7.0 +Requires: python3-six >= 1.10.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python-%{client}-lang = %{version}-%{release} + +%description -n python3-%{client} +%{common_desc} +%endif + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# We handle requirements ourselves, pkg_resources only bring pain +%py_req_cleanup + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +%py3_build +%endif + +# Generate i18n files +%{__python2} setup.py compile_catalog -d build/lib/openstackclient/locale + +%install +export PBR_VERSION=%{version} +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/openstack %{buildroot}%{_bindir}/openstack-%{python3_version} +ln -s ./openstack-%{python3_version} %{buildroot}%{_bindir}/openstack-3 +%endif + +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +ln -s ./openstack %{buildroot}%{_bindir}/openstack-2 +ln -s ./openstack %{buildroot}%{_bindir}/openstack-%{python2_version} + +%if 0%{?with_doc} +sphinx-build -b html doc/source doc/build/html +sphinx-build -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/openstack.1 %{buildroot}%{_mandir}/man1/openstack.1 + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess +%endif + +# Install i18n .mo files (.po and .pot are not required) +install -d -m 755 %{buildroot}%{_datadir} +rm -f %{buildroot}%{python2_sitelib}/openstackclient/locale/*/LC_*/openstackclient*po +rm -f %{buildroot}%{python2_sitelib}/openstackclient/locale/*pot +mv %{buildroot}%{python2_sitelib}/openstackclient/locale %{buildroot}%{_datadir}/locale + +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitelib}/openstackclient/locale +%endif + +# Find language files +%find_lang openstackclient --all-name + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} + + +%check +%if 0%{?with_check} +%{__python2} setup.py test +%if 0%{?with_python3} +rm -rf .testrepository +%{__python3} setup.py test +%endif +%endif + +%files -n python2-%{client} +%license LICENSE +%doc README.rst +%{_bindir}/openstack +%{_bindir}/openstack-2 +%{_bindir}/openstack-%{python2_version} +%{python2_sitelib}/openstackclient +%{python2_sitelib}/*.egg-info +%if 0%{?with_doc} +%{_mandir}/man1/openstack.1* + +%files -n python-%{client}-doc +%license LICENSE +%doc doc/build/html +%endif + +%files -n python-%{client}-lang -f openstackclient.lang +%license LICENSE + +%if 0%{?with_python3} +%files -n python3-%{client} +%license LICENSE +%doc README.rst +%{_bindir}/openstack-3 +%{_bindir}/openstack-%{python3_version} +%{python3_sitelib}/openstackclient +%{python3_sitelib}/*.egg-info +%endif + +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + +%files sdk +/usr/share/remote-clients/%{name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + +%changelog +* Tue Nov 27 2018 RDO 3.16.2-1 +- Update to 3.16.2 + +* Thu Sep 20 2018 RDO 3.16.1-1 +- Update to 3.16.1 + +* Thu Aug 09 2018 RDO 3.16.0-1 +- Update to 3.16.0 + diff --git a/openstack/python-openstackclient/centos/python-openstackclient.spec.orig b/openstack/python-openstackclient/centos/python-openstackclient.spec.orig new file mode 100644 index 00000000..e6d7994e --- /dev/null +++ b/openstack/python-openstackclient/centos/python-openstackclient.spec.orig @@ -0,0 +1,268 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +# Python3 support in OpenStack starts with version 3.5, +# which is only in Fedora 24+ +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +%global client openstackclient +%global with_doc 1 + +%global common_desc \ +python-openstackclient is a unified command-line client for the OpenStack APIs. \ +It is a thin wrapper to the stock python-*client modules that implement the \ +actual REST API client actions. + +Name: python-openstackclient +Version: 3.16.2 +Release: 1%{?dist} +Summary: OpenStack Command-line Client + +License: ASL 2.0 +URL: http://launchpad.net/%{name} +Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz + +BuildArch: noarch + +BuildRequires: git +BuildRequires: openstack-macros + +%description +%{common_desc} + +%package -n python2-%{client} +Summary: OpenStack Command-line Client +%{?python_provide:%python_provide python2-%{client}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pbr +BuildRequires: python2-six +BuildRequires: python2-oslo-i18n +BuildRequires: python2-oslo-utils +BuildRequires: python2-requests +BuildRequires: python2-glanceclient +BuildRequires: python2-keystoneclient +BuildRequires: python2-novaclient +BuildRequires: python2-cinderclient +BuildRequires: python2-mock +BuildRequires: python2-os-client-config +%if 0%{?fedora} > 0 +BuildRequires: python2-d2to1 +BuildRequires: python2-cliff +BuildRequires: python2-simplejson +BuildRequires: python2-requests-mock +%else +BuildRequires: python-d2to1 +BuildRequires: python-cliff +BuildRequires: python-simplejson +BuildRequires: python-requests-mock +%endif +# Required to compile translation files +BuildRequires: python2-babel +# Required for unit tests +BuildRequires: python2-os-testr +BuildRequires: python2-osc-lib-tests +BuildRequires: python2-fixtures +BuildRequires: python2-oslotest +BuildRequires: python2-reno +BuildRequires: python2-requestsexceptions +BuildRequires: python2-openstacksdk +BuildRequires: python2-osprofiler + +Requires: python2-pbr +Requires: python2-babel +Requires: python2-openstacksdk >= 0.11.2 +Requires: python2-oslo-i18n >= 3.15.3 +Requires: python2-oslo-utils >= 3.33.0 +Requires: python2-glanceclient >= 1:2.8.0 +Requires: python2-keystoneauth1 >= 3.4.0 +Requires: python2-keystoneclient >= 1:3.17.0 +Requires: python2-novaclient >= 9.1.0 +Requires: python2-cinderclient >= 3.3.0 +Requires: python2-neutronclient >= 6.7.0 +Requires: python2-six >= 1.10.0 +Requires: python2-osc-lib >= 1.10.0 +%if 0%{?fedora} > 0 +Requires: python2-cliff +%else +Requires: python-cliff +%endif +Requires: python-%{client}-lang = %{version}-%{release} + + +%description -n python2-%{client} +%{common_desc} + +%if 0%{?with_doc} +%package -n python-%{client}-doc +Summary: Documentation for OpenStack Command-line Client + +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-sphinxcontrib-apidoc + +Requires: %{name} = %{version}-%{release} + +%description -n python-%{client}-doc +%{common_desc} + +This package contains auto-generated documentation. +%endif + +%package -n python-%{client}-lang +Summary: Translation files for Openstackclient + +%description -n python-%{client}-lang +Translation files for Openstackclient + +%if 0%{?with_python3} +%package -n python3-%{client} +Summary: OpenStack Command-line Client +%{?python_provide:%python_provide python3-%{client}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-d2to1 +BuildRequires: python3-oslo-sphinx +BuildRequires: python3-six +BuildRequires: python3-cliff +BuildRequires: python3-oslo-i18n +BuildRequires: python3-oslo-utils +BuildRequires: python3-simplejson +BuildRequires: python3-requests +BuildRequires: python3-glanceclient +BuildRequires: python3-keystoneclient +BuildRequires: python3-novaclient +BuildRequires: python3-cinderclient +BuildRequires: python3-mock +BuildRequires: python3-requests-mock +BuildRequires: python3-os-client-config +# Required to compile translation files +BuildRequires: python3-babel +# Required for unit tests +BuildRequires: python3-os-testr +BuildRequires: python3-osc-lib-tests +BuildRequires: python3-coverage +BuildRequires: python3-fixtures +BuildRequires: python3-oslotest +BuildRequires: python3-reno +BuildRequires: python3-requestsexceptions +BuildRequires: python3-openstacksdk +BuildRequires: python3-osprofiler + +Requires: python3-pbr +Requires: python3-babel +Requires: python3-cliff +Requires: python3-openstacksdk >= 0.11.2 +Requires: python3-oslo-i18n >= 3.15.3 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-glanceclient >= 1:2.8.0 +Requires: python3-keystoneauth1 >= 3.4.0 +Requires: python3-keystoneclient >= 1:3.17.0 +Requires: python3-novaclient >= 9.1.0 +Requires: python3-cinderclient >= 3.3.0 +Requires: python3-neutronclient >= 6.7.0 +Requires: python3-six >= 1.10.0 +Requires: python3-osc-lib >= 1.10.0 +Requires: python-%{client}-lang = %{version}-%{release} + +%description -n python3-%{client} +%{common_desc} +%endif + +%prep +%autosetup -n %{name}-%{upstream_version} -S git + +# We handle requirements ourselves, pkg_resources only bring pain +%py_req_cleanup + +%build +%py2_build +%if 0%{?with_python3} +%py3_build +%endif + +# Generate i18n files +%{__python2} setup.py compile_catalog -d build/lib/openstackclient/locale + +%install +%if 0%{?with_python3} +%py3_install +mv %{buildroot}%{_bindir}/openstack %{buildroot}%{_bindir}/openstack-%{python3_version} +ln -s ./openstack-%{python3_version} %{buildroot}%{_bindir}/openstack-3 +%endif + +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +ln -s ./openstack %{buildroot}%{_bindir}/openstack-2 +ln -s ./openstack %{buildroot}%{_bindir}/openstack-%{python2_version} + +%if 0%{?with_doc} +sphinx-build -b html doc/source doc/build/html +sphinx-build -b man doc/source doc/build/man +install -p -D -m 644 doc/build/man/openstack.1 %{buildroot}%{_mandir}/man1/openstack.1 + +# Fix hidden-file-or-dir warnings +rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo doc/build/html/.htaccess +%endif + +# Install i18n .mo files (.po and .pot are not required) +install -d -m 755 %{buildroot}%{_datadir} +rm -f %{buildroot}%{python2_sitelib}/openstackclient/locale/*/LC_*/openstackclient*po +rm -f %{buildroot}%{python2_sitelib}/openstackclient/locale/*pot +mv %{buildroot}%{python2_sitelib}/openstackclient/locale %{buildroot}%{_datadir}/locale + +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitelib}/openstackclient/locale +%endif + +# Find language files +%find_lang openstackclient --all-name + +%check +%{__python2} setup.py test +%if 0%{?with_python3} +rm -rf .testrepository +%{__python3} setup.py test +%endif + +%files -n python2-%{client} +%license LICENSE +%doc README.rst +%{_bindir}/openstack +%{_bindir}/openstack-2 +%{_bindir}/openstack-%{python2_version} +%{python2_sitelib}/openstackclient +%{python2_sitelib}/*.egg-info +%if 0%{?with_doc} +%{_mandir}/man1/openstack.1* + +%files -n python-%{client}-doc +%license LICENSE +%doc doc/build/html +%endif + +%files -n python-%{client}-lang -f openstackclient.lang +%license LICENSE + +%if 0%{?with_python3} +%files -n python3-%{client} +%license LICENSE +%doc README.rst +%{_bindir}/openstack-3 +%{_bindir}/openstack-%{python3_version} +%{python3_sitelib}/openstackclient +%{python3_sitelib}/*.egg-info +%endif +%changelog +* Tue Nov 27 2018 RDO 3.16.2-1 +- Update to 3.16.2 + +* Thu Sep 20 2018 RDO 3.16.1-1 +- Update to 3.16.1 + +* Thu Aug 09 2018 RDO 3.16.0-1 +- Update to 3.16.0 + diff --git a/openstack/python-openstackclient/centos/srpm_path b/openstack/python-openstackclient/centos/srpm_path deleted file mode 100644 index f8078d19..00000000 --- a/openstack/python-openstackclient/centos/srpm_path +++ /dev/null @@ -1 +0,0 @@ -mirror:Source/python-openstackclient-3.12.0-1.el7.src.rpm diff --git a/openstack/python-openstacksdk/centos/build_srpm.data b/openstack/python-openstacksdk/centos/build_srpm.data index b77bf787..59c953f0 100644 --- a/openstack/python-openstacksdk/centos/build_srpm.data +++ b/openstack/python-openstacksdk/centos/build_srpm.data @@ -1,3 +1,3 @@ +TAR_NAME=openstacksdk SRC_DIR="$CGCS_BASE/git/python-openstacksdk" -TIS_BASE_SRCREV=7d723da3ffe9861e6e9abcaeadc1991689f782c5 -TIS_PATCH_VER=GITREVCOUNT +TIS_PATCH_VER=0 diff --git a/openstack/python-openstacksdk/centos/python-openstacksdk.spec b/openstack/python-openstacksdk/centos/python-openstacksdk.spec index 7100794d..ce2f9280 100644 --- a/openstack/python-openstacksdk/centos/python-openstacksdk.spec +++ b/openstack/python-openstacksdk/centos/python-openstacksdk.spec @@ -3,25 +3,36 @@ %global with_python3 1 %endif -# Disable docs while openstackdocstheme is packaged +# Disable docs until bs4 package is available %global with_doc 0 +# STX: Disable unit tests as part of build +%global do_check 0 + %global pypi_name openstacksdk +%global common_desc \ +A collection of libraries for building applications to work with OpenStack \ +clouds. + +%global common_desc_tests \ +A collection of libraries for building applications to work with OpenStack \ +clouds - test files + Name: python-%{pypi_name} -Version: 0.9.17 -Release: 0%{?_tis_dist}.%{tis_patch_ver} +Version: 0.17.2 +Release: 1%{?_tis_dist}.%{tis_patch_ver} Summary: An SDK for building applications to work with OpenStack License: ASL 2.0 URL: http://www.openstack.org/ -Source0: %{name}-%{version}%{?milestone}.tar.gz +Source0: https://pypi.io/packages/source/o/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz BuildArch: noarch +BuildRequires: git %description -A collection of libraries for building applications to work with OpenStack -clouds. +%{common_desc} %package -n python2-%{pypi_name} Summary: An SDK for building applications to work with OpenStack @@ -30,37 +41,71 @@ Summary: An SDK for building applications to work with OpenStack BuildRequires: python2-devel BuildRequires: python2-pip BuildRequires: python2-wheel -BuildRequires: python-pbr >= 2.0.0 -BuildRequires: python-sphinx -BuildRequires: python-oslo-sphinx -BuildRequires: python-requests -BuildRequires: python-keystoneauth1 -BuildRequires: python-oslo-utils -BuildRequires: python-deprecation -BuildRequires: python-os-client-config +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-appdirs +BuildRequires: python2-requestsexceptions +BuildRequires: python2-munch +BuildRequires: python2-jmespath +BuildRequires: python2-futures +BuildRequires: python2-jsonschema +BuildRequires: python2-os-service-types # Test requirements -BuildRequires: python-coverage -BuildRequires: python-iso8601 >= 0.1.11 -BuildRequires: python-jsonpatch >= 1.1 -BuildRequires: python-subunit -BuildRequires: python-os-testr -BuildRequires: python-mock -BuildRequires: python-testrepository -BuildRequires: python-testscenarios -BuildRequires: python-testtools +BuildRequires: python2-deprecation +BuildRequires: python2-iso8601 >= 0.1.11 +BuildRequires: python2-jsonpatch >= 1.6 +BuildRequires: python2-subunit +BuildRequires: python2-oslotest +BuildRequires: python2-stestr +BuildRequires: python2-mock +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios +BuildRequires: python2-testtools +BuildRequires: python2-glanceclient +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: python2-requests-mock +BuildRequires: python2-decorator +BuildRequires: python2-dogpile-cache +BuildRequires: python2-ipaddress +BuildRequires: python2-netifaces +%else +BuildRequires: python-requests-mock +BuildRequires: python-decorator +BuildRequires: python-dogpile-cache +BuildRequires: python-ipaddress +BuildRequires: python-netifaces +%endif -Requires: python-deprecation -Requires: python-jsonpatch >= 1.1 -Requires: python-iso8601 >= 0.1.11 -Requires: python-keystoneauth1 >= 3.1.0 -Requires: python-os-client-config >= 1.28.0 -Requires: python-oslo-utils -Requires: python-six -Requires: python-stevedore +Requires: python2-deprecation +Requires: python2-jsonpatch >= 1.16 +Requires: python2-keystoneauth1 >= 3.8.0 +Requires: python2-six +Requires: python2-pbr >= 2.0.0 +Requires: python2-appdirs +Requires: python2-requestsexceptions >= 1.2.0 +Requires: python2-munch +Requires: python2-jmespath +Requires: python2-futures +Requires: python2-iso8601 +Requires: python2-os-service-types >= 1.2.0 +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: python2-decorator +Requires: python2-dogpile-cache +Requires: python2-ipaddress +Requires: python2-netifaces +Requires: python2-pyyaml +%else +Requires: python-decorator +Requires: python-dogpile-cache +Requires: python-ipaddress +Requires: python-netifaces +Requires: PyYAML +%endif %description -n python2-%{pypi_name} -A collection of libraries for building applications to work with OpenStack -clouds. +%{common_desc} %package -n python2-%{pypi_name}-tests Summary: An SDK for building applications to work with OpenStack - test files @@ -68,47 +113,58 @@ Summary: An SDK for building applications to work with OpenStack - test f Requires: python2-%{pypi_name} = %{version}-%{release} %description -n python2-%{pypi_name}-tests -A collection of libraries for building applications to work with OpenStack -clouds - test files - -%package sdk -Summary: SDK files for %{name} - -%description sdk -Contains SDK files for %{name} package - +%{common_desc_tests} %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: An SDK for building applications to work with OpenStack %{?python_provide:%python_provide python3-%{pypi_name}} - + BuildRequires: python3-devel -BuildRequires: python3-pbr >= 1.8 -BuildRequires: python3-sphinx -BuildRequires: python3-oslo-sphinx -BuildRequires: python3-requests +BuildRequires: python3-pbr >= 2.0.0 BuildRequires: python3-keystoneauth1 -BuildRequires: python3-oslo-utils -BuildRequires: python3-os-client-config +BuildRequires: python3-dogpile-cache +BuildRequires: python3-appdirs +BuildRequires: python3-requestsexceptions +BuildRequires: python3-munch +BuildRequires: python3-decorator +BuildRequires: python3-jmespath +BuildRequires: python3-netifaces +BuildRequires: python3-jsonschema +BuildRequires: python3-os-service-types # Test requirements -BuildRequires: python3-coverage +BuildRequires: python3-deprecation +BuildRequires: python3-iso8601 >= 0.1.11 +BuildRequires: python3-jsonpatch >= 1.6 BuildRequires: python3-subunit -BuildRequires: python3-os-testr +BuildRequires: python3-oslotest +BuildRequires: python3-stestr BuildRequires: python3-mock +BuildRequires: python3-requests-mock BuildRequires: python3-testrepository BuildRequires: python3-testscenarios BuildRequires: python3-testtools +BuildRequires: python3-glanceclient -Requires: python3-keystoneauth1 -Requires: python3-os-client-config -Requires: python3-oslo-utils +Requires: python3-deprecation +Requires: python3-jsonpatch >= 1.16 +Requires: python3-keystoneauth1 >= 3.8.0 Requires: python3-six -Requires: python3-stevedore +Requires: python3-pbr >= 2.0.0 +Requires: python3-PyYAML +Requires: python3-appdirs +Requires: python3-requestsexceptions >= 1.2.0 +Requires: python3-dogpile-cache +Requires: python3-munch +Requires: python3-decorator +Requires: python3-jmespath +Requires: python3-netifaces +Requires: python3-jsonschema +Requires: python3-iso8601 +Requires: python3-os-service-types >= 1.2.0 %description -n python3-%{pypi_name} -A collection of libraries for building applications to work with OpenStack -clouds. +%{common_desc} %package -n python3-%{pypi_name}-tests Summary: An SDK for building applications to work with OpenStack - test files @@ -116,8 +172,7 @@ Summary: An SDK for building applications to work with OpenStack - test f Requires: python3-%{pypi_name} = %{version}-%{release} %description -n python3-%{pypi_name}-tests -A collection of libraries for building applications to work with OpenStack -clouds - test files +%{common_desc_tests} %endif @@ -132,7 +187,9 @@ clouds - documentation. %endif %prep -%autosetup -n %{name}-%{upstream_version} -S git +%autosetup -n %{pypi_name}-%{upstream_version} -S git +# Let RPM handle the requirements +rm -rf {,test-}requirements.txt %build export PBR_VERSION=%{version} @@ -152,32 +209,37 @@ rm -rf html/.{doctrees,buildinfo} %install export PBR_VERSION=%{version} -%py2_install -mkdir -p $RPM_BUILD_ROOT/wheels -install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ - %if 0%{?with_python3} %{py3_install} %endif +%py2_install -# prep SDK package +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package mkdir -p %{buildroot}/usr/share/remote-clients -tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{name}-%{version} +tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{pypi_name}-%{version} %check -export PBR_VERSION=%{version} -%{__python2} setup.py test +%if 0%{?do_check} +export OS_STDOUT_CAPTURE=true +export OS_STDERR_CAPTURE=true +export OS_TEST_TIMEOUT=10 +stestr --test-path ./openstack/tests/unit run %if 0%{?with_python3} rm -rf .testrepository -export PBR_VERSION=%{version} -%{__python3} setup.py test +stestr-3 --test-path ./openstack/tests/unit run +%endif %endif %files -n python2-%{pypi_name} %doc README.rst %license LICENSE +%{_bindir}/openstack-inventory %{python2_sitelib}/openstack %{python2_sitelib}/%{pypi_name}-*.egg-info %exclude %{python2_sitelib}/openstack/tests @@ -203,8 +265,14 @@ export PBR_VERSION=%{version} %{python3_sitelib}/openstack/tests %endif +%package sdk +Summary: SDK files for %{name} + +%description sdk +Contains SDK files for %{name} package + %files sdk -/usr/share/remote-clients/%{name}-%{version}.tgz +/usr/share/remote-clients/%{pypi_name}-%{version}.tgz %package wheels Summary: %{name} wheels @@ -215,6 +283,9 @@ Contains python wheels for %{name} %files wheels /wheels/* + %changelog -* Mon Sep 12 2016 Haikel Guemar 0.9.5-1 -- Update to 0.9.5 +* Thu Aug 09 2018 RDO 0.17.2-1 +- Update to 0.17.2 + + diff --git a/openstack/python-openstacksdk/centos/python-openstacksdk.spec.orig b/openstack/python-openstacksdk/centos/python-openstacksdk.spec.orig new file mode 100644 index 00000000..6df8f208 --- /dev/null +++ b/openstack/python-openstacksdk/centos/python-openstacksdk.spec.orig @@ -0,0 +1,254 @@ +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +# Disable docs until bs4 package is available +%global with_doc 0 + +%global pypi_name openstacksdk + +%global common_desc \ +A collection of libraries for building applications to work with OpenStack \ +clouds. + +%global common_desc_tests \ +A collection of libraries for building applications to work with OpenStack \ +clouds - test files + +Name: python-%{pypi_name} +Version: 0.17.2 +Release: 1%{?dist} +Summary: An SDK for building applications to work with OpenStack + +License: ASL 2.0 +URL: http://www.openstack.org/ +Source0: https://pypi.io/packages/source/o/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz +BuildArch: noarch + +BuildRequires: git + +%description +%{common_desc} + +%package -n python2-%{pypi_name} +Summary: An SDK for building applications to work with OpenStack +%{?python_provide:%python_provide python2-%{pypi_name}} + +BuildRequires: python2-devel +BuildRequires: python2-pbr >= 2.0.0 +BuildRequires: python2-sphinx +BuildRequires: python2-openstackdocstheme +BuildRequires: python2-keystoneauth1 +BuildRequires: python2-appdirs +BuildRequires: python2-requestsexceptions +BuildRequires: python2-munch +BuildRequires: python2-jmespath +BuildRequires: python2-futures +BuildRequires: python2-jsonschema +BuildRequires: python2-os-service-types +# Test requirements +BuildRequires: python2-deprecation +BuildRequires: python2-iso8601 >= 0.1.11 +BuildRequires: python2-jsonpatch >= 1.6 +BuildRequires: python2-subunit +BuildRequires: python2-oslotest +BuildRequires: python2-stestr +BuildRequires: python2-mock +BuildRequires: python2-testrepository +BuildRequires: python2-testscenarios +BuildRequires: python2-testtools +BuildRequires: python2-glanceclient +%if 0%{?fedora} || 0%{?rhel} > 7 +BuildRequires: python2-requests-mock +BuildRequires: python2-decorator +BuildRequires: python2-dogpile-cache +BuildRequires: python2-ipaddress +BuildRequires: python2-netifaces +%else +BuildRequires: python-requests-mock +BuildRequires: python-decorator +BuildRequires: python-dogpile-cache +BuildRequires: python-ipaddress +BuildRequires: python-netifaces +%endif + +Requires: python2-deprecation +Requires: python2-jsonpatch >= 1.16 +Requires: python2-keystoneauth1 >= 3.8.0 +Requires: python2-six +Requires: python2-pbr >= 2.0.0 +Requires: python2-appdirs +Requires: python2-requestsexceptions >= 1.2.0 +Requires: python2-munch +Requires: python2-jmespath +Requires: python2-futures +Requires: python2-iso8601 +Requires: python2-os-service-types >= 1.2.0 +%if 0%{?fedora} || 0%{?rhel} > 7 +Requires: python2-decorator +Requires: python2-dogpile-cache +Requires: python2-ipaddress +Requires: python2-netifaces +Requires: python2-pyyaml +%else +Requires: python-decorator +Requires: python-dogpile-cache +Requires: python-ipaddress +Requires: python-netifaces +Requires: PyYAML +%endif + +%description -n python2-%{pypi_name} +%{common_desc} + +%package -n python2-%{pypi_name}-tests +Summary: An SDK for building applications to work with OpenStack - test files + +Requires: python2-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +%{common_desc_tests} + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: An SDK for building applications to work with OpenStack +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-pbr >= 2.0.0 +BuildRequires: python3-keystoneauth1 +BuildRequires: python3-dogpile-cache +BuildRequires: python3-appdirs +BuildRequires: python3-requestsexceptions +BuildRequires: python3-munch +BuildRequires: python3-decorator +BuildRequires: python3-jmespath +BuildRequires: python3-netifaces +BuildRequires: python3-jsonschema +BuildRequires: python3-os-service-types +# Test requirements +BuildRequires: python3-deprecation +BuildRequires: python3-iso8601 >= 0.1.11 +BuildRequires: python3-jsonpatch >= 1.6 +BuildRequires: python3-subunit +BuildRequires: python3-oslotest +BuildRequires: python3-stestr +BuildRequires: python3-mock +BuildRequires: python3-requests-mock +BuildRequires: python3-testrepository +BuildRequires: python3-testscenarios +BuildRequires: python3-testtools +BuildRequires: python3-glanceclient + +Requires: python3-deprecation +Requires: python3-jsonpatch >= 1.16 +Requires: python3-keystoneauth1 >= 3.8.0 +Requires: python3-six +Requires: python3-pbr >= 2.0.0 +Requires: python3-PyYAML +Requires: python3-appdirs +Requires: python3-requestsexceptions >= 1.2.0 +Requires: python3-dogpile-cache +Requires: python3-munch +Requires: python3-decorator +Requires: python3-jmespath +Requires: python3-netifaces +Requires: python3-jsonschema +Requires: python3-iso8601 +Requires: python3-os-service-types >= 1.2.0 + +%description -n python3-%{pypi_name} +%{common_desc} + +%package -n python3-%{pypi_name}-tests +Summary: An SDK for building applications to work with OpenStack - test files + +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +%{common_desc_tests} + +%endif + + +%if 0%{?with_doc} +%package -n python-%{pypi_name}-doc +Summary: An SDK for building applications to work with OpenStack - documentation + +%description -n python-%{pypi_name}-doc +A collection of libraries for building applications to work with OpenStack +clouds - documentation. +%endif + +%prep +%autosetup -n %{pypi_name}-%{upstream_version} -S git +# Let RPM handle the requirements +rm -rf {,test-}requirements.txt + +%build +%py2_build + +%if 0%{?with_python3} +%{py3_build} +%endif + +%if 0%{?with_doc} +# generate html docs +sphinx-build -b html doc/source html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%if 0%{?with_python3} +%{py3_install} +%endif +%py2_install + +%check +export OS_STDOUT_CAPTURE=true +export OS_STDERR_CAPTURE=true +export OS_TEST_TIMEOUT=10 +stestr --test-path ./openstack/tests/unit run + +%if 0%{?with_python3} +rm -rf .testrepository +stestr-3 --test-path ./openstack/tests/unit run +%endif + + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/openstack-inventory +%{python2_sitelib}/openstack +%{python2_sitelib}/%{pypi_name}-*.egg-info +%exclude %{python2_sitelib}/openstack/tests + +%files -n python2-%{pypi_name}-tests +%{python2_sitelib}/openstack/tests + +%if 0%{?with_doc} +%files -n python-%{pypi_name}-doc +%doc html +%license LICENSE +%endif + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{python3_sitelib}/openstack +%{python3_sitelib}/%{pypi_name}-*.egg-info +%exclude %{python3_sitelib}/openstack/tests + +%files -n python3-%{pypi_name}-tests +%{python3_sitelib}/openstack/tests +%endif + +%changelog +* Thu Aug 09 2018 RDO 0.17.2-1 +- Update to 0.17.2 + + diff --git a/openstack/python-pankoclient/centos/build_srpm.data b/openstack/python-pankoclient/centos/build_srpm.data new file mode 100644 index 00000000..8bc4cc31 --- /dev/null +++ b/openstack/python-pankoclient/centos/build_srpm.data @@ -0,0 +1,3 @@ +TAR_NAME=pankoclient +SRC_DIR=$CGCS_BASE/git/python-pankoclient +TIS_PATCH_VER=0 diff --git a/openstack/python-pankoclient/centos/python-pankoclient.spec b/openstack/python-pankoclient/centos/python-pankoclient.spec new file mode 100644 index 00000000..7bd53d85 --- /dev/null +++ b/openstack/python-pankoclient/centos/python-pankoclient.spec @@ -0,0 +1,237 @@ +%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} +%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} + +%global pypi_name pankoclient + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +Name: python-pankoclient +Version: 0.5.0 +Release: 1%{?_tis_dist}.%{tis_patch_ver} +Summary: Python API and CLI for OpenStack Panko + +License: ASL 2.0 +URL: https://github.com/openstack/%{name} +Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz + +BuildArch: noarch + + +%package -n python2-%{pypi_name} +Summary: Python API and CLI for OpenStack Panko +%{?python_provide:%python_provide python2-%{pypi_name}} + + +BuildRequires: git +BuildRequires: python-setuptools +BuildRequires: python2-pip +BuildRequires: python2-wheel +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: python-tools + +Requires: python-keystoneauth1 >= 2.18.0 +Requires: python-osc-lib >= 1.2.0 +Requires: python-oslo-i18n >= 2.1.0 +Requires: python-oslo-serialization >= 1.10.0 +Requires: python-oslo-utils >= 3.18.0 +Requires: python-pbr +Requires: python-requests +Requires: python-six >= 1.9.0 + + +%description -n python2-%{pypi_name} +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + + +%package -n python-%{pypi_name}-doc +Summary: Documentation for OpenStack Panko API Client +Group: Documentation + +BuildRequires: python-sphinx +BuildRequires: python-openstackdocstheme +# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476760/ is in u-c +BuildRequires: python-oslo-sphinx +BuildRequires: python-openstack-doc-tools +BuildRequires: python-osc-lib +# test +BuildRequires: python-babel + +%description doc +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool +(panko). + +This package contains auto-generated documentation. + +%package -n python2-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Panko Tests +Requires: python-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Python API and CLI for OpenStack Panko + +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools +BuildRequires: python3-tools + +Requires: python3-keystoneauth1 >= 2.18.0 +Requires: python3-osc-lib >= 1.2.0 +Requires: python3-oslo-i18n >= 2.1.0 +Requires: python3-oslo-serialization >= 1.10.0 +Requires: python3-oslo-utils >= 3.18.0 +Requires: python3-pbr +Requires: python3-requests +Requires: python3-six >= 1.9.0 + +%description -n python3-%{pypi_name} +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%package -n python3-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Panko Tests +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%endif + +%description +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + + +%prep +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +2to3 --write --nobackups %{py3dir} +%endif + +# Remove bundled egg-info +rm -rf pankoclient.egg-info + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + +%build +export PBR_VERSION=%{version} +%py2_build +%py2_build_wheel +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py build +popd +%endif + + +%install +export PBR_VERSION=%{version} +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py install --skip-build --root %{buildroot} +popd +mv %{buildroot}%{_bindir}/panko %{buildroot}%{_bindir}/panko-%{python3_version} +ln -s ./panko-%{python3_version} %{buildroot}%{_bindir}/panko-3 +%endif + +%{__python2} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}%{_bindir}/panko %{buildroot}%{_bindir}/panko-%{python2_version} +ln -s %{_bindir}/panko-%{python2_version} %{buildroot}%{_bindir}/panko-2 +ln -s %{_bindir}/panko-2 %{buildroot}%{_bindir}/panko + +# Some env variables required to successfully build our doc +export PATH=$PATH:%{buildroot}%{_bindir} +export LANG=en_US.utf8 +%{__python2} setup.py build_sphinx -b html + +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo + +# STX: stage wheels +mkdir -p $RPM_BUILD_ROOT/wheels +install -m 644 dist/*.whl $RPM_BUILD_ROOT/wheels/ + +# STX: prep SDK package +mkdir -p %{buildroot}/usr/share/remote-clients +tar zcf %{buildroot}/usr/share/remote-clients/%{pypi_name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' -C .. %{pypi_name}-%{version} + + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/panko +%{_bindir}/panko-2 +%{_bindir}/panko-%{python2_version} +# XXX: man page build is broken +#%{_mandir}/man1/panko.1* +%{python2_sitelib}/pankoclient +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/pankoclient/tests + +%files -n python2-%{pypi_name}-tests +%license LICENSE +%{python2_sitelib}/pankoclient/tests + + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/panko-3 +%{_bindir}/panko-%{python3_version} +%{python3_sitelib}/pankoclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/pankoclient/tests + +%files -n python3-%{pypi_name}-tests +%license LICENSE +%{python3_sitelib}/pankoclient/tests + +%endif + +%files -n python-%{pypi_name}-doc +%doc doc/build/html +%license LICENSE + +%package sdk +Summary: SDK files for %{pypi_name} + +%description sdk +Contains SDK files for %{pypi_name} package + +%files sdk +/usr/share/remote-clients/%{pypi_name}-%{version}.tgz + +%package wheels +Summary: %{name} wheels + +%description wheels +Contains python wheels for %{name} + +%files wheels +/wheels/* + + +%changelog +* Wed Aug 22 2018 RDO 0.5.0-1 +- Update to 0.5.0 + + diff --git a/openstack/python-pankoclient/centos/python-pankoclient.spec.orig b/openstack/python-pankoclient/centos/python-pankoclient.spec.orig new file mode 100644 index 00000000..d6ff9220 --- /dev/null +++ b/openstack/python-pankoclient/centos/python-pankoclient.spec.orig @@ -0,0 +1,204 @@ +%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} +%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')} + +%global pypi_name pankoclient + +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} + +%if 0%{?fedora} >= 24 +%global with_python3 1 +%endif + +Name: python-pankoclient +Version: 0.5.0 +Release: 1%{?dist} +Summary: Python API and CLI for OpenStack Panko + +License: ASL 2.0 +URL: https://github.com/openstack/%{name} +Source0: https://tarballs.openstack.org/%{name}/%{pypi_name}-%{upstream_version}.tar.gz + +BuildArch: noarch + + +%package -n python2-%{pypi_name} +Summary: Python API and CLI for OpenStack Panko +%{?python_provide:%python_provide python2-%{pypi_name}} + + +BuildRequires: git +BuildRequires: python-setuptools +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: python-tools + +Requires: python-keystoneauth1 >= 2.18.0 +Requires: python-osc-lib >= 1.2.0 +Requires: python-oslo-i18n >= 2.1.0 +Requires: python-oslo-serialization >= 1.10.0 +Requires: python-oslo-utils >= 3.18.0 +Requires: python-pbr +Requires: python-requests +Requires: python-six >= 1.9.0 + + +%description -n python2-%{pypi_name} +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + + +%package -n python-%{pypi_name}-doc +Summary: Documentation for OpenStack Panko API Client +Group: Documentation + +BuildRequires: python-sphinx +BuildRequires: python-openstackdocstheme +# FIXME: remove following line when a new release including https://review.openstack.org/#/c/476760/ is in u-c +BuildRequires: python-oslo-sphinx +BuildRequires: python-openstack-doc-tools +BuildRequires: python-osc-lib +# test +BuildRequires: python-babel + +%description doc +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool +(panko). + +This package contains auto-generated documentation. + +%package -n python2-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Panko Tests +Requires: python-%{pypi_name} = %{version}-%{release} + +%description -n python2-%{pypi_name}-tests +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%if 0%{?with_python3} +%package -n python3-%{pypi_name} +Summary: Python API and CLI for OpenStack Panko + +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-pbr +BuildRequires: python3-setuptools +BuildRequires: python3-tools + +Requires: python3-keystoneauth1 >= 2.18.0 +Requires: python3-osc-lib >= 1.2.0 +Requires: python3-oslo-i18n >= 2.1.0 +Requires: python3-oslo-serialization >= 1.10.0 +Requires: python3-oslo-utils >= 3.18.0 +Requires: python3-pbr +Requires: python3-requests +Requires: python3-six >= 1.9.0 + +%description -n python3-%{pypi_name} +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%package -n python3-%{pypi_name}-tests +Summary: Python API and CLI for OpenStack Panko Tests +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-tests +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + +%endif + +%description +This is a client library for Panko built on the Panko API. It +provides a Python API (the pankoclient module) and a command-line tool. + + +%prep +%autosetup -n %{pypi_name}-%{upstream_version} -S git + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +2to3 --write --nobackups %{py3dir} +%endif + +# Remove bundled egg-info +rm -rf pankoclient.egg-info + +# Let RPM handle the requirements +rm -f {,test-}requirements.txt + +%build +%py2_build +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py build +popd +%endif + + +%install +%if 0%{?with_python3} +pushd %{py3dir} +LANG=en_US.UTF-8 %{__python3} setup.py install --skip-build --root %{buildroot} +popd +mv %{buildroot}%{_bindir}/panko %{buildroot}%{_bindir}/panko-%{python3_version} +ln -s ./panko-%{python3_version} %{buildroot}%{_bindir}/panko-3 +%endif + +%{__python2} setup.py install --skip-build --root %{buildroot} +mv %{buildroot}%{_bindir}/panko %{buildroot}%{_bindir}/panko-%{python2_version} +ln -s %{_bindir}/panko-%{python2_version} %{buildroot}%{_bindir}/panko-2 +ln -s %{_bindir}/panko-2 %{buildroot}%{_bindir}/panko + +# Some env variables required to successfully build our doc +export PATH=$PATH:%{buildroot}%{_bindir} +export LANG=en_US.utf8 +%{__python2} setup.py build_sphinx -b html + +# Fix hidden-file-or-dir warnings +rm -rf doc/build/html/.doctrees doc/build/html/.buildinfo + +%files -n python2-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/panko +%{_bindir}/panko-2 +%{_bindir}/panko-%{python2_version} +# XXX: man page build is broken +#%{_mandir}/man1/panko.1* +%{python2_sitelib}/pankoclient +%{python2_sitelib}/*.egg-info +%exclude %{python2_sitelib}/pankoclient/tests + +%files -n python2-%{pypi_name}-tests +%license LICENSE +%{python2_sitelib}/pankoclient/tests + + +%if 0%{?with_python3} +%files -n python3-%{pypi_name} +%doc README.rst +%license LICENSE +%{_bindir}/panko-3 +%{_bindir}/panko-%{python3_version} +%{python3_sitelib}/pankoclient +%{python3_sitelib}/*.egg-info +%exclude %{python3_sitelib}/pankoclient/tests + +%files -n python3-%{pypi_name}-tests +%license LICENSE +%{python3_sitelib}/pankoclient/tests + +%endif + +%files -n python-%{pypi_name}-doc +%doc doc/build/html +%license LICENSE + +%changelog +* Wed Aug 22 2018 RDO 0.5.0-1 +- Update to 0.5.0 + +