diff -Nru python-openstackclient-3.14.0/AUTHORS python-openstackclient-3.14.2/AUTHORS --- python-openstackclient-3.14.0/AUTHORS 2018-01-25 14:28:58.000000000 +0000 +++ python-openstackclient-3.14.2/AUTHORS 2018-06-04 03:31:42.000000000 +0000 @@ -78,6 +78,7 @@ Dougal Matthews Einst Crazy Elena Ezhova +Emilien Macchi Eric Brown Fang Zhen Fei Long Wang @@ -233,6 +234,7 @@ Sascha Peilicke Sascha Peilicke Sean Dague +Sean McGinnis Sean Perry Sean Perry Shane Wang diff -Nru python-openstackclient-3.14.0/ChangeLog python-openstackclient-3.14.2/ChangeLog --- python-openstackclient-3.14.0/ChangeLog 2018-01-25 14:28:57.000000000 +0000 +++ python-openstackclient-3.14.2/ChangeLog 2018-06-04 03:31:41.000000000 +0000 @@ -1,6 +1,23 @@ CHANGES ======= +3.14.2 +------ + +* Re-implement novaclient bits removed in 10.0 +* Clean up W503 and E402 pep8 errors + +3.14.1 +------ + +* neutron: add --mtu for create/set network +* Rename python-openstacksdk to openstacksdk +* Handle SDK changes +* Updated from global requirements +* Updated from global requirements +* Update UPPER\_CONSTRAINTS\_FILE for stable/queens +* Update .gitreview for stable/queens + 3.14.0 ------ diff -Nru python-openstackclient-3.14.0/debian/changelog python-openstackclient-3.14.2/debian/changelog --- python-openstackclient-3.14.0/debian/changelog 2018-02-12 14:30:43.000000000 +0000 +++ python-openstackclient-3.14.2/debian/changelog 2018-11-05 13:38:38.000000000 +0000 @@ -1,3 +1,10 @@ +python-openstackclient (3.14.2-0ubuntu1) bionic; urgency=medium + + * d/gbp.conf: Create stable/queens branch. + * New stable point release for OpenStack Queens (LP: #1800490). + + -- Corey Bryant Mon, 05 Nov 2018 08:38:38 -0500 + python-openstackclient (3.14.0-0ubuntu1) bionic; urgency=medium * New upstream release. diff -Nru python-openstackclient-3.14.0/debian/gbp.conf python-openstackclient-3.14.2/debian/gbp.conf --- python-openstackclient-3.14.0/debian/gbp.conf 2018-02-12 14:30:43.000000000 +0000 +++ python-openstackclient-3.14.2/debian/gbp.conf 2018-11-05 13:38:38.000000000 +0000 @@ -1,5 +1,5 @@ [DEFAULT] -debian-branch = master +debian-branch = stable/queens upstream-tag = %(version)s pristine-tar = True diff -Nru python-openstackclient-3.14.0/doc/source/cli/command-objects/network.rst python-openstackclient-3.14.2/doc/source/cli/command-objects/network.rst --- python-openstackclient-3.14.0/doc/source/cli/command-objects/network.rst 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/doc/source/cli/command-objects/network.rst 2018-06-04 03:28:38.000000000 +0000 @@ -24,6 +24,7 @@ [--enable | --disable] [--share | --no-share] [--description ] + [--mtu ] [--availability-zone-hint ] [--enable-port-security | --disable-port-security] [--external [--default | --no-default] | --internal] @@ -74,6 +75,12 @@ *Network version 2 only* +.. option:: --mtu + + Set network mtu + + *Network version 2 only* + .. option:: --availability-zone-hint Availability Zone in which to create this network @@ -353,6 +360,7 @@ [--enable | --disable] [--share | --no-share] [--description ] + [--mtu ] [--enable-port-security | --disable-port-security] [--external [--default | --no-default] | --internal] [--provider-network-type ] @@ -386,6 +394,10 @@ Set network description +.. option:: --mtu + + Set network mtu + .. option:: --enable-port-security Enable port security by default for ports created on diff -Nru python-openstackclient-3.14.0/openstackclient/api/compute_v2.py python-openstackclient-3.14.2/openstackclient/api/compute_v2.py --- python-openstackclient-3.14.0/openstackclient/api/compute_v2.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/api/compute_v2.py 2018-06-04 03:28:38.000000000 +0000 @@ -93,7 +93,51 @@ return ret - # Flaoting IPs + # Floating IPs + + def floating_ip_add( + self, + server, + address, + fixed_address=None, + ): + """Add a floating IP to a server + + :param server: + The :class:`Server` (or its ID) to add an IP to. + :param address: + The FloatingIP or string floating address to add. + :param fixed_address: + The FixedIP the floatingIP should be associated with (optional) + """ + + url = '/servers' + + server = self.find( + url, + attr='name', + value=server, + ) + + address = address.ip if hasattr(address, 'ip') else address + if fixed_address: + if hasattr(fixed_address, 'ip'): + fixed_address = fixed_address.ip + + body = { + 'address': address, + 'fixed_address': fixed_address, + } + else: + body = { + 'address': address, + } + + return self._request( + "POST", + "/%s/%s/action" % (url, server['id']), + json={'addFloatingIp': body}, + ) def floating_ip_create( self, @@ -175,6 +219,38 @@ return self.list(url)["floating_ips"] + def floating_ip_remove( + self, + server, + address, + ): + """Remove a floating IP from a server + + :param server: + The :class:`Server` (or its ID) to add an IP to. + :param address: + The FloatingIP or string floating address to add. + """ + + url = '/servers' + + server = self.find( + url, + attr='name', + value=server, + ) + + address = address.ip if hasattr(address, 'ip') else address + body = { + 'address': address, + } + + return self._request( + "POST", + "/%s/%s/action" % (url, server['id']), + json={'removeFloatingIp': body}, + ) + # Floating IP Pools def floating_ip_pool_list( @@ -192,6 +268,84 @@ return self.list(url)["floating_ip_pools"] + # Hosts + + def host_list( + self, + zone=None, + ): + """Lists hypervisor Hosts + + https://developer.openstack.org/api-ref/compute/#list-hosts + Valid for Compute 2.0 - 2.42 + + :param string zone: + Availability zone + :returns: A dict of the floating IP attributes + """ + + url = "/os-hosts" + if zone: + url = '/os-hosts?zone=%s' % zone + + return self.list(url)["hosts"] + + def host_set( + self, + host=None, + status=None, + maintenance_mode=None, + **params + ): + """Modify host properties + + https://developer.openstack.org/api-ref/compute/#update-host-status + Valid for Compute 2.0 - 2.42 + + status + maintenance_mode + """ + + url = "/os-hosts" + + params = {} + if status: + params['status'] = status + if maintenance_mode: + params['maintenance_mode'] = maintenance_mode + if params == {}: + # Don't bother calling if nothing given + return None + else: + return self._request( + "PUT", + "/%s/%s" % (url, host), + json=params, + ).json() + + def host_show( + self, + host=None, + ): + """Show host + + https://developer.openstack.org/api-ref/compute/#show-host-details + Valid for Compute 2.0 - 2.42 + """ + + url = "/os-hosts" + + r_host = self.find( + url, + attr='host_name', + value=host, + ) + + data = [] + for h in r_host: + data.append(h['resource']) + return data + # Networks def network_create( diff -Nru python-openstackclient-3.14.0/openstackclient/common/extension.py python-openstackclient-3.14.2/openstackclient/common/extension.py --- python-openstackclient-3.14.0/openstackclient/common/extension.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/common/extension.py 2018-06-04 03:28:38.000000000 +0000 @@ -75,8 +75,10 @@ # by default we want to show everything, unless the # user specifies one or more of the APIs to show # for now, only identity and compute are supported. - show_all = (not parsed_args.identity and not parsed_args.compute - and not parsed_args.volume and not parsed_args.network) + show_all = (not parsed_args.identity and + not parsed_args.compute and + not parsed_args.volume and + not parsed_args.network) if parsed_args.identity or show_all: identity_client = self.app.client_manager.identity diff -Nru python-openstackclient-3.14.0/openstackclient/compute/v2/host.py python-openstackclient-3.14.2/openstackclient/compute/v2/host.py --- python-openstackclient-3.14.0/openstackclient/compute/v2/host.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/compute/v2/host.py 2018-06-04 03:28:38.000000000 +0000 @@ -40,9 +40,9 @@ "Service", "Zone" ) - data = compute_client.hosts.list_all(parsed_args.zone) + data = compute_client.api.host_list(parsed_args.zone) return (columns, - (utils.get_item_properties( + (utils.get_dict_properties( s, columns, ) for s in data)) @@ -95,13 +95,7 @@ compute_client = self.app.client_manager.compute - # More than one hosts will be returned by using find_resource() - # so that the return value cannot be used in host update() method. - # find_resource() is just used for checking existence of host and - # keeping the exception message consistent with other commands. - utils.find_resource(compute_client.hosts, parsed_args.host) - - compute_client.hosts.update( + compute_client.api.host_set( parsed_args.host, kwargs ) @@ -128,8 +122,10 @@ "Memory MB", "Disk GB" ) - data = compute_client.hosts.get(parsed_args.host) + + data = compute_client.api.host_show(parsed_args.host) + return (columns, - (utils.get_item_properties( + (utils.get_dict_properties( s, columns, ) for s in data)) diff -Nru python-openstackclient-3.14.0/openstackclient/compute/v2/server.py python-openstackclient-3.14.2/openstackclient/compute/v2/server.py --- python-openstackclient-3.14.0/openstackclient/compute/v2/server.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/compute/v2/server.py 2018-06-04 03:28:48.000000000 +0000 @@ -32,6 +32,7 @@ from openstackclient.i18n import _ from openstackclient.identity import common as identity_common +from openstackclient.network import common as network_common LOG = logging.getLogger(__name__) @@ -234,11 +235,10 @@ ) -class AddFloatingIP(command.Command): +class AddFloatingIP(network_common.NetworkAndComputeCommand): _description = _("Add floating IP address to server") - def get_parser(self, prog_name): - parser = super(AddFloatingIP, self).get_parser(prog_name) + def update_parser_common(self, parser): parser.add_argument( "server", metavar="", @@ -252,19 +252,37 @@ parser.add_argument( "--fixed-ip-address", metavar="", - help=_("Fixed IP address to associate with this floating IP " - "address"), + help=_( + "Fixed IP address to associate with this floating IP address" + ), ) return parser - def take_action(self, parsed_args): + def take_action_network(self, client, parsed_args): compute_client = self.app.client_manager.compute + attrs = {} + obj = client.find_ip( + parsed_args.ip_address, + ignore_missing=False, + ) server = utils.find_resource( - compute_client.servers, parsed_args.server) + compute_client.servers, + parsed_args.server, + ) + port = list(client.ports(device_id=server.id))[0] + attrs['port_id'] = port.id + if parsed_args.fixed_ip_address: + attrs['fixed_ip_address'] = parsed_args.fixed_ip_address + + client.update_ip(obj, **attrs) - server.add_floating_ip(parsed_args.ip_address, - parsed_args.fixed_ip_address) + def take_action_compute(self, client, parsed_args): + client.api.floating_ip_add( + parsed_args.server, + parsed_args.ip_address, + fixed_address=parsed_args.fixed_ip_address, + ) class AddPort(command.Command): @@ -1482,11 +1500,10 @@ server.remove_fixed_ip(parsed_args.ip_address) -class RemoveFloatingIP(command.Command): +class RemoveFloatingIP(network_common.NetworkAndComputeCommand): _description = _("Remove floating IP address from server") - def get_parser(self, prog_name): - parser = super(RemoveFloatingIP, self).get_parser(prog_name) + def update_parser_common(self, parser): parser.add_argument( "server", metavar="", @@ -1501,13 +1518,21 @@ ) return parser - def take_action(self, parsed_args): - compute_client = self.app.client_manager.compute + def take_action_network(self, client, parsed_args): + attrs = {} + obj = client.find_ip( + parsed_args.ip_address, + ignore_missing=False, + ) + attrs['port_id'] = None - server = utils.find_resource( - compute_client.servers, parsed_args.server) + client.update_ip(obj, **attrs) - server.remove_floating_ip(parsed_args.ip_address) + def take_action_compute(self, client, parsed_args): + client.api.floating_ip_remove( + parsed_args.server, + parsed_args.ip_address, + ) class RemovePort(command.Command): diff -Nru python-openstackclient-3.14.0/openstackclient/identity/v3/role.py python-openstackclient-3.14.2/openstackclient/identity/v3/role.py --- python-openstackclient-3.14.0/openstackclient/identity/v3/role.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/identity/v3/role.py 2018-06-04 03:28:38.000000000 +0000 @@ -126,8 +126,8 @@ def take_action(self, parsed_args): identity_client = self.app.client_manager.identity - if (not parsed_args.user and not parsed_args.domain - and not parsed_args.group and not parsed_args.project): + if (not parsed_args.user and not parsed_args.domain and + not parsed_args.group and not parsed_args.project): msg = _("Role not added, incorrect set of arguments " "provided. See openstack --help for more details") raise exceptions.CommandError(msg) @@ -399,8 +399,8 @@ def take_action(self, parsed_args): identity_client = self.app.client_manager.identity - if (not parsed_args.user and not parsed_args.domain - and not parsed_args.group and not parsed_args.project): + if (not parsed_args.user and not parsed_args.domain and + not parsed_args.group and not parsed_args.project): msg = _("Incorrect set of arguments provided. " "See openstack --help for more details") raise exceptions.CommandError(msg) diff -Nru python-openstackclient-3.14.0/openstackclient/image/v1/image.py python-openstackclient-3.14.2/openstackclient/image/v1/image.py --- python-openstackclient-3.14.0/openstackclient/image/v1/image.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/image/v1/image.py 2018-06-04 03:28:38.000000000 +0000 @@ -21,11 +21,6 @@ import os import sys -if os.name == "nt": - import msvcrt -else: - msvcrt = None - from glanceclient.common import utils as gc_utils from osc_lib.cli import parseractions from osc_lib.command import command @@ -35,6 +30,11 @@ from openstackclient.api import utils as api_utils from openstackclient.i18n import _ +if os.name == "nt": + import msvcrt +else: + msvcrt = None + CONTAINER_CHOICES = ["ami", "ari", "aki", "bare", "docker", "ova", "ovf"] DEFAULT_CONTAINER_FORMAT = 'bare' diff -Nru python-openstackclient-3.14.0/openstackclient/__init__.py python-openstackclient-3.14.2/openstackclient/__init__.py --- python-openstackclient-3.14.0/openstackclient/__init__.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/__init__.py 2018-06-04 03:28:38.000000000 +0000 @@ -11,10 +11,10 @@ # under the License. # -__all__ = ['__version__'] - import pbr.version +__all__ = ['__version__'] + version_info = pbr.version.VersionInfo('python-openstackclient') try: __version__ = version_info.version_string() diff -Nru python-openstackclient-3.14.0/openstackclient/network/common.py python-openstackclient-3.14.2/openstackclient/network/common.py --- python-openstackclient-3.14.0/openstackclient/network/common.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/network/common.py 2018-06-04 03:28:38.000000000 +0000 @@ -48,7 +48,10 @@ parser = super(NetworkAndComputeCommand, self).get_parser(prog_name) parser = self.update_parser_common(parser) LOG.debug('common parser: %s', parser) - if self.app.client_manager.is_network_endpoint_enabled(): + if ( + self.app is None or + self.app.client_manager.is_network_endpoint_enabled() + ): return self.update_parser_network(parser) else: return self.update_parser_compute(parser) diff -Nru python-openstackclient-3.14.0/openstackclient/network/v2/network.py python-openstackclient-3.14.2/openstackclient/network/v2/network.py --- python-openstackclient-3.14.0/openstackclient/network/v2/network.py 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/openstackclient/network/v2/network.py 2018-06-04 03:28:38.000000000 +0000 @@ -107,6 +107,10 @@ if parsed_args.description: attrs['description'] = parsed_args.description + # set mtu + if parsed_args.mtu: + attrs['mtu'] = parsed_args.mtu + # update_external_network_options if parsed_args.internal: attrs['router:external'] = False @@ -217,6 +221,11 @@ metavar='', help=_("Set network description") ) + parser.add_argument( + '--mtu', + metavar='', + help=_("Set network mtu") + ) identity_common.add_project_domain_option_to_parser(parser) parser.add_argument( '--availability-zone-hint', @@ -619,6 +628,11 @@ metavar="=1.9.0 # Apache-2.0 python-designateclient>=2.7.0 # Apache-2.0 python-heatclient>=1.10.0 # Apache-2.0 -python-ironicclient>=1.14.0 # Apache-2.0 +python-ironicclient>=2.2.0 # Apache-2.0 python-ironic-inspector-client>=1.5.0 # Apache-2.0 python-karborclient>=0.6.0 # Apache-2.0 -python-mistralclient>=3.1.0 # Apache-2.0 +python-mistralclient!=3.2.0,>=3.1.0 # Apache-2.0 python-muranoclient>=0.8.2 # Apache-2.0 python-neutronclient>=6.3.0 # Apache-2.0 python-octaviaclient>=1.3.0 # Apache-2.0 diff -Nru python-openstackclient-3.14.0/tox.ini python-openstackclient-3.14.2/tox.ini --- python-openstackclient-3.14.0/tox.ini 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/tox.ini 2018-06-04 03:28:48.000000000 +0000 @@ -11,7 +11,7 @@ OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt commands = stestr run {posargs} @@ -106,14 +106,14 @@ [testenv:docs] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx [testenv:releasenotes] deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = diff -Nru python-openstackclient-3.14.0/.zuul.yaml python-openstackclient-3.14.2/.zuul.yaml --- python-openstackclient-3.14.0/.zuul.yaml 2018-01-25 14:25:53.000000000 +0000 +++ python-openstackclient-3.14.2/.zuul.yaml 2018-06-04 03:28:48.000000000 +0000 @@ -11,7 +11,7 @@ - openstack/os-client-config - openstack/osc-lib - openstack/python-openstackclient - - openstack/python-openstacksdk + - openstack/openstacksdk vars: tox_envlist: py27 # Set work dir to openstackclient so that if it's triggered by one of the @@ -33,7 +33,7 @@ - openstack/os-client-config - openstack/osc-lib - openstack/python-openstackclient - - openstack/python-openstacksdk + - openstack/openstacksdk vars: # Set work dir to openstackclient so that if it's triggered by one of the # other repos the tests will run in the same place @@ -54,7 +54,7 @@ - openstack/os-client-config - openstack/osc-lib - openstack/python-openstackclient - - openstack/python-openstacksdk + - openstack/openstacksdk vars: # Set work dir to openstackclient so that if it's triggered by one of the # other repos the tests will run in the same place @@ -158,11 +158,11 @@ - openstack/os-client-config - openstack/osc-lib - openstack/python-openstackclient - - openstack/python-openstacksdk + - openstack/openstacksdk vars: devstack_localrc: USE_PYTHON3: true - LIBS_FROM_GIT: python-openstackclient,python-openstacksdk,osc-lib,os-client-config + LIBS_FROM_GIT: python-openstackclient,openstacksdk,osc-lib,os-client-config # This is insufficient, but leaving it here as a reminder of what may # someday be all we need to make this work # disable_python3_package swift