Updated exposed services and webservises api/cmd. Updated requirements and tox.
Change-Id: I7cc9952d0655ea2740e98049204307b56e8263c9
This commit is contained in:
		
							
								
								
									
										6
									
								
								.eggs/README.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.eggs/README.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. | ||||
|  | ||||
| This directory caches those eggs to prevent repeated downloads. | ||||
|  | ||||
| However, it is safe to delete this directory. | ||||
|  | ||||
| @@ -28,6 +28,7 @@ class AmbiguousAuthSystem(ClientException): | ||||
|     """Could not obtain token and endpoint using provided credentials.""" | ||||
|     pass | ||||
|  | ||||
|  | ||||
| # Alias for backwards compatibility | ||||
| AmbigiousAuthSystem = AmbiguousAuthSystem | ||||
|  | ||||
|   | ||||
| @@ -443,5 +443,6 @@ def main(): | ||||
|         print(encodeutils.safe_encode(six.text_type(e)), file=sys.stderr) | ||||
|         return 1 | ||||
|  | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|     sys.exit(main()) | ||||
|   | ||||
| @@ -104,3 +104,9 @@ class ExposedServiceManager(base.Manager): | ||||
|         path = "%(board)s/services/restore" % { | ||||
|             'board': board_ident} | ||||
|         return self._list(self._path(path), "exposed") | ||||
|  | ||||
|     def status_services(self, board_ident): | ||||
|  | ||||
|         path = "%(board)s/services/status" % { | ||||
|             'board': board_ident} | ||||
|         return self._list(self._path(path), "exposed") | ||||
|   | ||||
| @@ -119,7 +119,6 @@ def do_restore_service(cc, args): | ||||
|               help="Name or UUID of the board.") | ||||
| def do_restore_services(cc, args): | ||||
|     """Execute an action of the service.""" | ||||
|  | ||||
|     fields = res_fields.EXPOSED_SERVICE_RESOURCE_ON_BOARD.fields | ||||
|     field_labels = res_fields.EXPOSED_SERVICE_RESOURCE_ON_BOARD.labels | ||||
|     list = cc.exposed_service.restore_services(args.board) | ||||
| @@ -130,3 +129,12 @@ def do_restore_services(cc, args): | ||||
|                             json_flag=args.json) | ||||
|     else: | ||||
|         print(_('%s') % 'no services could be found') | ||||
|  | ||||
|  | ||||
| @cliutils.arg('board', | ||||
|               metavar='<board>', | ||||
|               help="Name or UUID of the board.") | ||||
| def do_status_services(cc, args): | ||||
|     """Get status of sevices of the board.""" | ||||
|     result = cc.exposed_service.status_services(args.board) | ||||
|     print(_('%s') % result) | ||||
|   | ||||
| @@ -187,6 +187,11 @@ class WebServiceOnBoardManager(base.CreateManager): | ||||
|  | ||||
|         return self.api.raw_request('DELETE', self._path(path)) | ||||
|  | ||||
|     def renew_webservice(self, board_ident): | ||||
|         path = "%s/webservices/renew" % board_ident | ||||
|  | ||||
|         return self.api.raw_request('GET', self._path(path)) | ||||
|  | ||||
|  | ||||
| class EnabledWebservice(base.Resource): | ||||
|     def __repr__(self): | ||||
|   | ||||
| @@ -312,6 +312,14 @@ def do_disable_webservices(cc, args): | ||||
|     cc.webserviceonboard.disable_webservice(args.board) | ||||
|  | ||||
|  | ||||
| @cliutils.arg( | ||||
|     'board', | ||||
|     metavar='<board_uuid>', | ||||
|     help="UUID of the board ") | ||||
| def do_renew_webservice(cc, args): | ||||
|     cc.webserviceonboard.renew_webservice(args.board) | ||||
|  | ||||
|  | ||||
| @cliutils.arg( | ||||
|     '--limit', | ||||
|     metavar='<limit>', | ||||
|   | ||||
| @@ -4,14 +4,18 @@ | ||||
| pbr>=2.0.0 # Apache-2.0 | ||||
| appdirs>=1.3.0 # MIT License | ||||
| dogpile.cache>=0.6.2 # BSD | ||||
| jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT | ||||
| #jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT | ||||
| jsonschema>=3.2.0 # MIT | ||||
| keystoneauth1>=2.18.0 # Apache-2.0 | ||||
| osc-lib>=1.2.0 # Apache-2.0 | ||||
| oslo.i18n>=2.1.0 # Apache-2.0 | ||||
| #oslo.i18n>=2.1.0 # Apache-2.0 | ||||
| oslo.i18n>=3.15.3  # Apache-2.0 | ||||
| oslo.serialization>=1.10.0 # Apache-2.0 | ||||
| oslo.utils>=3.20.0 # Apache-2.0 | ||||
| PrettyTable<0.8,>=0.7.1 # BSD | ||||
| #oslo.utils>=3.20.0 # Apache-2.0 | ||||
| oslo.utils>=3.33.0,!=3.39.1,!=3.40.0,!=3.40.1  # Apache-2.0 | ||||
| #PrettyTable<0.8,>=0.7.1 # BSD | ||||
| PrettyTable>=2.4.0  | ||||
| python-openstackclient>=3.3.0 # Apache-2.0 | ||||
| PyYAML>=3.10.0 # MIT | ||||
| requests!=2.12.2,!=2.13.0,>=2.10.0 # Apache-2.0 | ||||
| requests!=2.24.0,!=2.20.0,>=2.10.0 # Apache-2.0 | ||||
| six>=1.9.0 # MIT | ||||
|   | ||||
| @@ -13,11 +13,10 @@ classifier = | ||||
|     License :: OSI Approved :: Apache Software License | ||||
|     Operating System :: POSIX :: Linux | ||||
|     Programming Language :: Python | ||||
|     Programming Language :: Python :: 2 | ||||
|     Programming Language :: Python :: 2.7 | ||||
|     Programming Language :: Python :: 3 | ||||
|     Programming Language :: Python :: 3.3 | ||||
|     Programming Language :: Python :: 3.4 | ||||
|     Programming Language :: Python :: 3.6 | ||||
|     Programming Language :: Python :: 3.7 | ||||
|     Programming Language :: Python :: 3.8 | ||||
|  | ||||
| [files] | ||||
| packages = | ||||
|   | ||||
| @@ -8,7 +8,8 @@ coverage>=4.0 # Apache-2.0 | ||||
| python-subunit>=0.0.18 # Apache-2.0/BSD | ||||
| sphinx>=1.5.1  # BSD | ||||
| oslosphinx>=4.7.0  # Apache-2.0 | ||||
| oslotest>=1.10.0 # Apache-2.0 | ||||
| # oslotest>=1.10.0 # Apache-2.0 | ||||
| oslotest>=3.2.0  # Apache-2.0 | ||||
| testrepository>=0.0.18  # Apache-2.0/BSD | ||||
| testscenarios>=0.4  # Apache-2.0/BSD | ||||
| testtools>=1.4.0 # MIT | ||||
|   | ||||
							
								
								
									
										18
									
								
								tox.ini
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								tox.ini
									
									
									
									
									
								
							| @@ -1,6 +1,6 @@ | ||||
| [tox] | ||||
| minversion = 2.3.1 | ||||
| envlist = py27,pep8 | ||||
| envlist = py36,py37,py38,pep8 | ||||
| skipsdist = True | ||||
|  | ||||
| [testenv] | ||||
| @@ -19,12 +19,20 @@ commands = | ||||
|     find . -type f -name "*.pyc" -delete | ||||
|  | ||||
| [testenv:pep8] | ||||
| basepython = python2.7 | ||||
| basepython = python3.8 | ||||
| #commands = /usr/local/bin/flake8 {posargs} | ||||
| #commands = /usr/bin/flake8 {posargs} | ||||
| commands = flake8 {posargs} | ||||
|  | ||||
| [testenv:py27] | ||||
| basepython = python2.7 | ||||
|  | ||||
| [testenv:py36] | ||||
| basepython = python3.6 | ||||
|  | ||||
| [testenv:py37] | ||||
| basepython = python3.7 | ||||
|  | ||||
| [testenv:py38] | ||||
| basepython = python3.8 | ||||
|  | ||||
| [flake8] | ||||
| # TODO(dmllr): Analyze or fix the warnings blacklisted below | ||||
| @@ -35,5 +43,5 @@ basepython = python2.7 | ||||
| # E123, E125 skipped as they are invalid PEP-8. | ||||
| show-source = True | ||||
| builtins = _ | ||||
| ignore = E711,E712,H404,H405,E123,E125,E901,H301 | ||||
| ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E711,E712,H405,W504,E731,H238,E126,E128,E731,H405,N530,W504,E129,E741,W503,F821,F999,F841,E402,W605,F405 | ||||
| exclude = .venv,.git,.tox,dist,doc,etc,*lib/python*,*egg,build | ||||
|   | ||||
							
								
								
									
										7
									
								
								zuul.d/projects.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								zuul.d/projects.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| - project: | ||||
|     templates: | ||||
|       - openstack-python38-jobs-no-constraints | ||||
|       - openstack-python37-jobs-no-constraints | ||||
|       - openstack-python36-jobs-no-constraints | ||||
|       - check-requirements | ||||
|       - publish-to-pypi | ||||
		Reference in New Issue
	
	Block a user
	 Nicola Peditto
					Nicola Peditto