1
0

- removed 0001-baremetal-Add-support-for-mkisofs-and-xorrisofs-for-.patch

- removed 0001-add-python-3.7-unit-test-job.patch
- update to version 0.36.0
  - Fix image create with tags
  - Handle oslo.config exceptions in from_conf
  - baremetal: raise more specific ResourceFailure in wait_for_* methods
  - Adding dns_domain parameter into create_network
  - Support deleting all routes in update_router
  - DRY test_connection
  - Return None from get_server_by_id on 404
  - Replace nodepool func jobs
  - Add support for generating form-post signatures
  - Update master for stable/stein
  - Properly convert baremetal fields to server-side values
  - Actually pass on network_data when building configdrive
  - Add support for global_request_id
  - baremetal.configdrive: tolerate user_data as a string
  - Add support for vendor hooks
  - Cap sphinx for py2 to match global requirements
  - Allow replacing service implementation
  - Fix some typos
  - Fix typo for subnet.py
  - Link to baremetal API reference from patch_node
  - Allow limiting Connection service_types from oslo.config
  - Add a fields meta_data to result of Senlin API
  - Make PATCH a first class operation and support it for baremetal
  - Switch cloud layer to use proxy for DNS
  - Remove Accept header with empty value for HEAD and DELETE requests
  - Bump keystoneauth1 minimum to 3.16.0
  - Enable ansible module test for keypair to check return data

OBS-URL: https://build.opensuse.org/package/show/Cloud:OpenStack:Factory/python-openstacksdk?expand=0&rev=34
This commit is contained in:
2019-10-09 12:55:36 +00:00
committed by Git OBS Bridge
parent 2cd40c46cd
commit 59bc2715c8
7 changed files with 181 additions and 153 deletions

View File

@@ -1,47 +0,0 @@
From b3723bed9dd2b336c63aa9bcf5a3e1ce08e2e290 Mon Sep 17 00:00:00 2001
From: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Date: Mon, 25 Mar 2019 11:01:00 +0000
Subject: [PATCH] add python 3.7 unit test job
See ML discussion here [1] for context.
[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html
Change-Id: If472ec316c5f5aaee15aab4d72964f806d3efff7
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
---
.zuul.yaml | 1 +
openstack/tests/unit/test_resource.py | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.zuul.yaml b/.zuul.yaml
index 6d0dcf81..ee9dea9f 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -396,6 +396,7 @@
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python36-jobs
+ - openstack-python37-jobs
- openstacksdk-functional-tips
- openstacksdk-tox-tips
- os-client-config-tox-tips
diff --git a/openstack/tests/unit/test_resource.py b/openstack/tests/unit/test_resource.py
index ee98777f..7b44a60d 100644
--- a/openstack/tests/unit/test_resource.py
+++ b/openstack/tests/unit/test_resource.py
@@ -1901,7 +1901,10 @@ class TestResourceActions(base.TestCase):
microversion=None)
# Ensure we're done after those three items
- self.assertRaises(StopIteration, next, results)
+ # In python3.7, PEP 479 is enabled for all code, and StopIteration
+ # raised directly from code is turned into a RuntimeError.
+ # Something about how mock is implemented triggers that here.
+ self.assertRaises((StopIteration, RuntimeError), next, results)
# Ensure we only made two calls to get this done
self.assertEqual(3, len(self.session.get.call_args_list))
--
2.21.0

View File

@@ -1,85 +0,0 @@
From 8fed470b09ac7db887ebdca38b369557b0b25f10 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Tue, 9 Apr 2019 13:01:22 +0200
Subject: [PATCH] baremetal: Add support for mkisofs and xorrisofs for
configdrive
Currently, only "genisoimage" is supported. But "genisoimage" might
not be available on all distros (like openSUSE or Debian).
So add support for "mkisofs" and "xorrisofs" which luckily support
the same command line parameters as "genisoimage".
Change-Id: I720f25921f8e52f20a631f238a528dedf65a91c6
---
openstack/baremetal/configdrive.py | 37 ++++++++++++-------
...ve-mkisofs-xorrisofs-075db4d7d80e5a13.yaml | 8 ++++
2 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 releasenotes/notes/baremetal-configdrive-mkisofs-xorrisofs-075db4d7d80e5a13.yaml
diff --git a/openstack/baremetal/configdrive.py b/openstack/baremetal/configdrive.py
index abbebf5a..b43d19b3 100644
--- a/openstack/baremetal/configdrive.py
+++ b/openstack/baremetal/configdrive.py
@@ -84,21 +84,32 @@ def pack(path):
:return: configdrive contents as a base64-encoded string.
"""
with tempfile.NamedTemporaryFile() as tmpfile:
- try:
- p = subprocess.Popen(['genisoimage',
- '-o', tmpfile.name,
- '-ldots', '-allow-lowercase',
- '-allow-multidot', '-l',
- '-publisher', 'metalsmith',
- '-quiet', '-J',
- '-r', '-V', 'config-2',
- path],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- except OSError as e:
+ # NOTE(toabctl): Luckily, genisoimage, mkisofs and xorrisofs understand
+ # the same parameters which are currently used.
+ cmds = ['genisoimage', 'mkisofs', 'xorrisofs']
+ for c in cmds:
+ try:
+ p = subprocess.Popen([c,
+ '-o', tmpfile.name,
+ '-ldots', '-allow-lowercase',
+ '-allow-multidot', '-l',
+ '-publisher', 'metalsmith',
+ '-quiet', '-J',
+ '-r', '-V', 'config-2',
+ path],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ except OSError as e:
+ error = e
+ else:
+ error = None
+ break
+
+ if error:
raise RuntimeError(
'Error generating the configdrive. Make sure the '
- '"genisoimage" tool is installed. Error: %s' % e)
+ '"genisoimage", "mkisofs" or "xorrisofs" tool is installed. '
+ 'Error: %s' % error)
stdout, stderr = p.communicate()
if p.returncode != 0:
diff --git a/releasenotes/notes/baremetal-configdrive-mkisofs-xorrisofs-075db4d7d80e5a13.yaml b/releasenotes/notes/baremetal-configdrive-mkisofs-xorrisofs-075db4d7d80e5a13.yaml
new file mode 100644
index 00000000..008459e8
--- /dev/null
+++ b/releasenotes/notes/baremetal-configdrive-mkisofs-xorrisofs-075db4d7d80e5a13.yaml
@@ -0,0 +1,8 @@
+---
+features:
+ - |
+ When generating a config drive for baremetal, "mkisofs" and "xorrisofs"
+ are now supported beside the already available "genisoimage" binary.
+ This is useful on environment where the "genisoimage" binary is not
+ available but "mkisofs" and/or "xorrisofs" are available.
+
--
2.21.0

View File

@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
<param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/stein/openstack/openstacksdk/openstacksdk.spec.j2</param>
<param name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/openstacksdk/openstacksdk.spec.j2</param>
<param name="output-name">python-openstacksdk.spec</param>
<param name="requirements">https://raw.githubusercontent.com/openstack/python-openstacksdk/stable/stein/requirements.txt</param>
<param name="requirements">https://raw.githubusercontent.com/openstack/python-openstacksdk/stable/train/requirements.txt</param>
<param name="changelog-email">cloud-devel@suse.de</param>
<param name="changelog-provider">gh,openstack,python-openstacksdk</param>
</service>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afcdc7453a9fa0265a141c5731043198e961c86fe9409258425da63aaaa7b4d9
size 818981

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fa82bd98414de8472e7cbadc33ac54efdaac53d225324806f9bf93ea9b777c2
size 887545

View File

@@ -1,3 +1,149 @@
-------------------------------------------------------------------
Wed Oct 9 12:55:21 UTC 2019 - cloud-devel@suse.de
- removed 0001-baremetal-Add-support-for-mkisofs-and-xorrisofs-for-.patch
- removed 0001-add-python-3.7-unit-test-job.patch
- update to version 0.36.0
- Fix image create with tags
- Handle oslo.config exceptions in from_conf
- baremetal: raise more specific ResourceFailure in wait_for_* methods
- Adding dns_domain parameter into create_network
- Support deleting all routes in update_router
- DRY test_connection
- Return None from get_server_by_id on 404
- Replace nodepool func jobs
- Add support for generating form-post signatures
- Update master for stable/stein
- Properly convert baremetal fields to server-side values
- Actually pass on network_data when building configdrive
- Add support for global_request_id
- baremetal.configdrive: tolerate user_data as a string
- Add support for vendor hooks
- Cap sphinx for py2 to match global requirements
- Allow replacing service implementation
- Fix some typos
- Fix typo for subnet.py
- Link to baremetal API reference from patch_node
- Allow limiting Connection service_types from oslo.config
- Add a fields meta_data to result of Senlin API
- Make PATCH a first class operation and support it for baremetal
- Switch cloud layer to use proxy for DNS
- Remove Accept header with empty value for HEAD and DELETE requests
- Bump keystoneauth1 minimum to 3.16.0
- Enable ansible module test for keypair to check return data
- Return empty lists for resources if neutron doesn't exist
- Update compute.server resource
- Remove now unused task_manager file
- Fix image deletion with tasks_api enabled
- Expand on a brief error message
- Add ability to provide qos_policy_id for port
- Update betacloud vendor entry
- Use Resource layer in cloud for SecurityGroups of server
- Add set-boot-device to baremetal
- Expose locked status for Server
- Move Orchestration methods into Proxy
- add python 3.7 unit test job
- Add strict_proxies option for Connection
- Update Limestone Networks vendor config
- Adds missing "params" attribute for creating a Mistral workflow execution
- Add support for all_tenants in OpenStackInventory
- Revert "Revert "Replace TaskManager with a keystoneauth concurrency""
- Add support for fields in baremetal get_* resources
- Pin to latest os-service-types
- Add floating IP port forwarding related methods
- Make factory for a CloudRegion from CONF objects
- Replace catalog-v3.json with keystoneauth fixture
- Add 'tag' support to compute with supported microversion
- Use Resource layer for network SecurityGroups
- baremetal-introspection: fix passing a Node to start_introspection
- Add access alias (aka) for the resource attributes
- Support Proxy-specific region_name
- Correct endpoint_override discovery for service with dashes in their type
- Move the history lesson into the docs
- Fix dns return values
- Workaround older octavia version discovery
- OpenDev Migration Patch
- Uncap jsonschema
- Support for the baremetal introspection service
- Skip attaching FloatingIP if it is already attached
- Increase randomness in ZONE creation
- force specify project_id during create Sg_rule may cause issue
- Add header to auto-delete image upload objects
- Remove and rearrange object bonged proxy tests
- Strip two more accept headers from object-storage
- Specify store when importing an image
- Split OpenStackCloud into reasonable pieces
- Fix DeprecationWarning for using logger.warn
- Fix bm tests: sort lists being compared
- Remove outdated devstack section from docs
- Cleanup split of openstackcloud
- Fix invalid assert state
- Rework statistics reporting
- Add node traits support to baremetal
- bug: avoid unnecessary object meta prefix
- from_conf: fix handling service names with dashes
- baremetal: Add support for mkisofs and xorrisofs for configdrive
- fixing timing
- Collect request stats
- Use Resource layer for compute KeyPairs
- Continue refactoring of the image
- baremetal: allow updating name and extra fields of an allocation
- Bail earlier on a version mismatch for a supported service
- Clarify error if no version can be found
- Deduplicate next-page URL's query params
- Add CloudRegion helper method for arbitrary endpoints
- Fix wait_for_server docstring
- Move pep8 requirements in to test-requirements
- Repair masakari FT
- Removing region La1 from the list of regions.
- Fix discovery cache sharing
- Add image.stage methods
- Minor fixups from from_conf changes
- Can't create a metadata named key, clear, delete
- Fix README example for cloud layer
- Use Resource layer for the compute Hypervsors and Images
- baremetal: implement the correct update of the maintenance_reason field
- Add logger to Proxy object
- docs: Add simplified CLI parser docs
- Deprecate ServerDetails class
- Retry large object manifest upload
- Initalize pool_executor so close works
- Collapse OpenStackSDKAdapter into Proxy
- Validate that connect_as connects as the project
- Allow deeper levels of nesting for pdf builds
- Skip most service_description for unknown services
- Rationalize endpoint_for and get_endpoint_from_catalog
- Add unit tests for connection.add_service
- Use Resource layer for next compute methods
- Update links
- Volume.Backup restore fixes
- Add proxy API reference to baremetal user guide
- Extract image download method into a mixin
- Use Resource layer for compute AZ and Aggregates
- Add Python 3 Train unit tests
- Do not disregard tags when updating stacks
- Set xenapi_use_agent to "False" instead of false
- Replace use of log.warn with log.warning
- Support skipping unknown QP
- Support microversion 2.61 for nova flavors
- Minor refactor cleanup of _make_proxy
- Move set_temp_url_key logic into resource objects
- Add release note for new disable service functionality
- Get rid of unused _OpenStackCloudMixin.get_region
- Try to fix the masakari CI job
- Create runtime descriptor for new service
- added support for binding:profile parameter in create_port/update_port
- Replace openstack.org git:// URLs with https://
- Avoid unnecessary object meta prefix in proxy
- Update api-ref location
- URL encode swift objects endpoints
- Update baremetal to use proxy logger
- Add "name" filter in "list" call when retrieving a single register
- Fix AttributeError bug when creating nested stacks
- Use auth_url as identity endpoint when not project scoped
- Finish updating links to point to opendev
- Add 'node' attribute to baremetal Allocation
-------------------------------------------------------------------
Fri Apr 12 04:33:52 UTC 2019 - cloud-devel@suse.de

View File

@@ -17,17 +17,13 @@
Name: python-openstacksdk
Version: 0.27.0
Version: 0.36.0
Release: 0
Summary: An SDK for building applications to work with OpenStack
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/openstacksdk
Source0: https://files.pythonhosted.org/packages/source/o/openstacksdk/openstacksdk-0.27.0.tar.gz
# https://review.openstack.org/#/c/651119/
Patch0: 0001-add-python-3.7-unit-test-job.patch
# https://review.openstack.org/#/c/651193/
Patch1: 0001-baremetal-Add-support-for-mkisofs-and-xorrisofs-for-.patch
Source0: https://files.pythonhosted.org/packages/source/o/openstacksdk/openstacksdk-0.36.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
BuildRequires: python2-PyYAML >= 3.12
@@ -43,17 +39,19 @@ BuildRequires: python2-ipaddress >= 1.0.17
BuildRequires: python2-jmespath >= 0.9.0
BuildRequires: python2-jsonpatch >= 1.16
BuildRequires: python2-jsonschema
BuildRequires: python2-keystoneauth1 >= 3.13.0
BuildRequires: python2-keystoneauth1 >= 3.16.0
BuildRequires: python2-mock
BuildRequires: python2-munch >= 2.1.0
BuildRequires: python2-netifaces >= 0.10.4
BuildRequires: python2-os-service-types >= 1.2.0
BuildRequires: python2-os-service-types >= 1.7.0
BuildRequires: python2-oslo.config
BuildRequires: python2-oslotest
BuildRequires: python2-pbr >= 2.0.0
BuildRequires: python2-python-subunit
BuildRequires: python2-requests-mock
BuildRequires: python2-requestsexceptions >= 1.2.0
BuildRequires: python2-six >= 1.10.0
BuildRequires: python2-statsd
BuildRequires: python2-stestr
BuildRequires: python2-stevedore
BuildRequires: python2-testscenarios
@@ -70,17 +68,19 @@ BuildRequires: python3-fixtures
BuildRequires: python3-jmespath >= 0.9.0
BuildRequires: python3-jsonpatch >= 1.16
BuildRequires: python3-jsonschema
BuildRequires: python3-keystoneauth1 >= 3.13.0
BuildRequires: python3-keystoneauth1 >= 3.16.0
BuildRequires: python3-mock
BuildRequires: python3-munch >= 2.1.0
BuildRequires: python3-netifaces >= 0.10.4
BuildRequires: python3-os-service-types >= 1.2.0
BuildRequires: python3-os-service-types >= 1.7.0
BuildRequires: python3-oslo.config
BuildRequires: python3-oslotest
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-python-subunit
BuildRequires: python3-requests-mock
BuildRequires: python3-requestsexceptions >= 1.2.0
BuildRequires: python3-six >= 1.10.0
BuildRequires: python3-statsd
BuildRequires: python3-stestr
BuildRequires: python3-stevedore
BuildRequires: python3-testscenarios
@@ -93,10 +93,10 @@ Requires: python-dogpile.cache >= 0.6.2
Requires: python-iso8601 >= 0.1.11
Requires: python-jmespath >= 0.9.0
Requires: python-jsonpatch >= 1.16
Requires: python-keystoneauth1 >= 3.13.0
Requires: python-keystoneauth1 >= 3.16.0
Requires: python-munch >= 2.1.0
Requires: python-netifaces >= 0.10.4
Requires: python-os-service-types >= 1.2.0
Requires: python-os-service-types >= 1.7.0
Requires: python-requestsexceptions >= 1.2.0
Requires: python-six >= 1.10.0
BuildArch: noarch
@@ -105,9 +105,18 @@ Requires: python-futures >= 3.0.0
Requires: python-ipaddress >= 1.0.17
%endif
%if 0%{?suse_version}
# RDO does not package prometheus_client
BuildRequires: python2-prometheus_client
BuildRequires: python3-prometheus_client
Requires(post): update-alternatives
Requires(postun): update-alternatives
%if 0%{?sle_version} >= 150000
Requires: mkisofs
%else
Requires: genisoimage
%endif
%else
Requires: genisoimage
# on RDO, update-alternatives is in chkconfig
Requires(post): chkconfig
Requires(postun): chkconfig
@@ -124,8 +133,8 @@ documentation, examples, and tools.
%package -n python-openstacksdk-doc
Summary: %{summary} - Documentation
Group: Documentation/HTML
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme
BuildRequires: python3-Sphinx
BuildRequires: python3-openstackdocstheme
Requires: %{name} = %{version}
%description -n python-openstacksdk-doc
@@ -139,14 +148,18 @@ The openstacksdk is a collection of libraries for building
applications to work with OpenStack clouds.
%prep
%autosetup -p1 -n openstacksdk-0.27.0
%autosetup -p1 -n openstacksdk-0.36.0
%py_req_cleanup
sed -i -e 's,coverage.*,,' test-requirements.txt || true
sed -i -e "s,'sphinx.ext.intersphinx'\,,," doc/source/conf.py
%if !0%{?suse_version}
# RDO does not package prometheus_client
rm openstack/tests/unit/test_stats.py
%endif
%build
%python_build
PBR_VERSION=0.27.0 sphinx-build -b html doc/source doc/build/html
PBR_VERSION=0.36.0 %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
@@ -161,6 +174,7 @@ rm -rf doc/build/html/.{doctrees,buildinfo}
%check
export OS_LOG_CAPTURE=true
export OS_TEST_TIMEOUT=30
%python_exec -m stestr.cli run
%files %{python_files}