commit python3-susepubliccloudinfo for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python3-susepubliccloudinfo for openSUSE:Factory checked in at 2022-03-31 17:18:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-susepubliccloudinfo (Old) and /work/SRC/openSUSE:Factory/.python3-susepubliccloudinfo.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-susepubliccloudinfo" Thu Mar 31 17:18:52 2022 rev:8 rq:966190 version:1.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python3-susepubliccloudinfo/python3-susepubliccloudinfo.changes 2021-12-18 20:30:48.390261219 +0100 +++ /work/SRC/openSUSE:Factory/.python3-susepubliccloudinfo.new.1900/python3-susepubliccloudinfo.changes 2022-03-31 17:19:28.200743295 +0200 @@ -1,0 +2,17 @@ +Thu Mar 31 11:05:57 UTC 2022 - Robert Schweikert <rjschwei@suse.com> + +- Update to version 1.4.0 + + Provide message when no regions or no images are found via cli and + XML output is requested + +------------------------------------------------------------------- +Wed Mar 30 14:55:44 UTC 2022 - Robert Schweikert <rjschwei@suse.com> + +- Update to version 1.3.1 + + Fix API breakage introduced with 1.3.0 + +- From 1.3.0 + + Update man page + + Provide message when no regions or no images are found via cli + +------------------------------------------------------------------- Old: ---- susepubliccloudinfo-1.2.2.tar.bz2 New: ---- susepubliccloudinfo-1.4.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-susepubliccloudinfo.spec ++++++ --- /var/tmp/diff_new_pack.laqmk1/_old 2022-03-31 17:19:28.620738540 +0200 +++ /var/tmp/diff_new_pack.laqmk1/_new 2022-03-31 17:19:28.624738494 +0200 @@ -1,7 +1,7 @@ # # spec file for package python3-susepubliccloudinfo # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define upstream_name susepubliccloudinfo Name: python3-susepubliccloudinfo -Version: 1.2.2 +Version: 1.4.0 Release: 0 Summary: Query SUSE Public Cloud Info Service License: GPL-3.0-or-later ++++++ susepubliccloudinfo-1.2.2.tar.bz2 -> susepubliccloudinfo-1.4.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/susepubliccloudinfo-1.2.2/bin/pint new/susepubliccloudinfo-1.4.0/bin/pint --- old/susepubliccloudinfo-1.2.2/bin/pint 2020-09-02 20:33:15.749634594 +0200 +++ new/susepubliccloudinfo-1.4.0/bin/pint 2022-03-31 13:04:56.627429626 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/python3 # -# Copyright (c) 2018 SUSE Linux GmbH. All rights reserved. +# Copyright (c) 2020 SUSE Linux GmbH. All rights reserved. # # This file is part of susePublicCloudInfoClient # @@ -71,21 +71,37 @@ Show program version """ -import sys import json +import sys from docopt import docopt import susepubliccloudinfoclient.infoserverrequests as ifsrequest import susepubliccloudinfoclient.version as version -provider_data = ifsrequest.get_provider_data(None, None, 'json', 'all', None) -providers = json.loads(provider_data) +try: + provider_data = ifsrequest.get_provider_data( + None, None, 'json', 'all', None + ) +except Exception: + print('Unable to contact pint server') + sys.exit(1) +try: + providers = json.loads(provider_data) +except json.decoder.JSONDecodeError: + print('Unable to load supported frameworks from server') + print('Received: "%s"' % provider_data) + cloud_providers = [] for provider in providers['providers']: cloud_providers.append(provider['name']) -command_args = docopt(__doc__.format(PROVIDERS = "|".join(cloud_providers)), version=version.VERSION) +command_args = docopt( + __doc__.format( + PROVIDERS = "|".join(cloud_providers) + ), + version=version.VERSION +) framework = None for csp in cloud_providers: @@ -94,7 +110,19 @@ break image_state = None -image_states = ('active', 'inactive', 'deleted', 'deprecated') +image_states_data = ifsrequest.get_image_states_data( + None, None, 'json', None +) +try: + image_state_info = json.loads(image_states_data) +except json.decoder.JSONDecodeError: + print('Unable to load image state data from server') + print('Received: "%s"' % image_states_data) + sys.exit(1) +image_states = [] +for possible_image_state in image_state_info.get('states'): + image_states.append(possible_image_state.get('name')) + for state in image_states: if command_args['--%s' % state]: image_state = state @@ -120,12 +148,15 @@ try: if command_args['images']: - print(ifsrequest.get_image_data( + data = ifsrequest.get_image_data( framework, image_state, output_format, region, - command_args['--filter'])) + command_args['--filter']) + if '<images/>' in data or '"images": []' in data: + data = 'No information available. Please check your filter' + print(data) elif command_args['servers']: print(ifsrequest.get_server_data( framework, @@ -155,11 +186,16 @@ region, command_args['--filter'])) else: - print(ifsrequest.get_regions_data( + regions = ifsrequest.get_regions_data( framework, server_type, output_format, region, - command_args['--filter'])) + command_args['--filter']) + if '<regions/>' in regions or '"regions": []' in regions: + regions = ('No region information available. Images have ' + 'the same identifier in all regions') + print(regions) + except Exception: sys.exit(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/susepubliccloudinfo-1.2.2/lib/susepubliccloudinfoclient/infoserverrequests.py new/susepubliccloudinfo-1.4.0/lib/susepubliccloudinfoclient/infoserverrequests.py --- old/susepubliccloudinfo-1.2.2/lib/susepubliccloudinfoclient/infoserverrequests.py 2020-09-02 20:33:15.749634594 +0200 +++ new/susepubliccloudinfo-1.4.0/lib/susepubliccloudinfoclient/infoserverrequests.py 2022-03-31 13:04:56.627429626 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 2018 SUSE Linux GmbH. All rights reserved. +# Copyright (c) 2020 SUSE Linux GmbH. All rights reserved. # # This file is part of susePublicCloudInfoClient # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/susepubliccloudinfo-1.2.2/lib/susepubliccloudinfoclient/version.py new/susepubliccloudinfo-1.4.0/lib/susepubliccloudinfoclient/version.py --- old/susepubliccloudinfo-1.2.2/lib/susepubliccloudinfoclient/version.py 2020-09-02 20:33:15.749634594 +0200 +++ new/susepubliccloudinfo-1.4.0/lib/susepubliccloudinfoclient/version.py 2022-03-31 13:04:56.627429626 +0200 @@ -17,4 +17,4 @@ # along with susePublicCloudInfoClient. If not, see # <http://www.gnu.org/licenses/>. # -VERSION = '1.2.2' +VERSION = '1.4.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/susepubliccloudinfo-1.2.2/man/man1/pint.1 new/susepubliccloudinfo-1.4.0/man/man1/pint.1 --- old/susepubliccloudinfo-1.2.2/man/man1/pint.1 2020-09-02 20:33:15.749634594 +0200 +++ new/susepubliccloudinfo-1.4.0/man/man1/pint.1 2022-03-31 13:04:56.627429626 +0200 @@ -32,19 +32,19 @@ .P For example: .IP https://susepubliccloudinfo.suse.com/v1/providers.json -Provides list of all providers in JSON format. +Provides a list of all providers in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/images/states.json -Provides list of all image states in JSON format. +Provides a list of all image states in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/amazon/servers/types.json -Provides list of all server types in Amazon Web Service EC2 in JSON format. +Provides a list of all server types in Amazon Web Service EC2 in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/amazon/regions.json -Provides list of all known regions in Amazon Web Service EC2 in JSON format. +Provides a list of all known regions in Amazon Web Service EC2 in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/amazon/servers.json Provides information about all servers part of the SUSE update infrastructure in Amazon Web Services EC2 in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/google/images/active.json -Provides information about all the active images in Google Compute images -in JSON format. +Provides information about all the active images published in Google Compute +Engine in JSON format. .IP https://susepubliccloudinfo.suse.com/v1/microsoft/West%20US/images/active.xm... Provides information about all active images in Microsoft Azure in the 'West US' region. @@ -55,16 +55,27 @@ provided by the information service and provides additional filtering capabilities. .SH ARGUMENTS +.IP "<providers>" +The +.I <providers> +argument is used to obtain a list of frameworks for which additional +information is available. Use one of the values for the +.I framework +argument. +.IP "<image_states>" +The +.I <image_states> +argument is used to obtain a list of states that describe the maintenance +mode of the image. Each listed state can be used as an option when querying +image information. .IP "<framework>" -One of the supported cloud frameworks, -.IR amazon , -.IR google, -.IR microsoft -or -.IR oracle . +One of the supported cloud frameworks obtained with the +.I providers +argument. The .I <framework> -argument specifies for which cloud provider the information should be retrieved. +argument specifies for which cloud provider the information should be +retrieved. .IP "<data-selector>" One of the supported information types, .I images @@ -80,32 +91,12 @@ argument is provided information about the SUSE operated servers in the SUSE maintained update infrastructure is retrieved. .SH OPTIONS -.IP "--active" -The -.I active -option is only valid when used with the -.I images -argument. It provides information about the latest published images. -The latest published images are the only images considered -.I active -while all images released prior to the current images are considered -deprecated even if some of the previously released images may still be -available for launch. -.IP "--deleted" -The -.I deleted -option is only valid when used with the -.I images -argument. It provides information about deleted images. Deleted images -are images that were previously published but have been superceded by newer -images and have surpassed the deprecation period of 6 months. -.IP "--deprecated" -The -.I deprecated -option is only valid when used with the +.IP "<image_state>" +One of the image states obtained with the +.I image_states +argument. This option is only valid when used with the .I images -argument. It provides information about images that can still be launched but -are considered deprecated. The SUSE deprecation period is 6 months. +argument. It provides information about images in the given state. .IP "--filter" Filter the information based on the given value(s). If the information is to be filtered on more than one entry type provide a comma separated @@ -170,7 +161,7 @@ .BR name% . .B Note -that the name for all update servers (SMT servers) is the same in each +that the name for all update servers is the same in each cloud framework. For example .I smt-azure.susecloud.net in the Microsoft Azure Public Cloud framework. The names are not resolvable via @@ -229,4 +220,4 @@ Will provide information about the active 'priority' images in Microsoft Azure. .SH AUTHORS -Robert Schweikert (rjschwei@suse.com), James Mason (jmason@suse.com) +SUSE Public Cloud Team (public-cloud-dev@susecloud.net)
participants (1)
-
Source-Sync