From d119695fe774cb527d8b7f77889c5cce463d8b29 Mon Sep 17 00:00:00 2001 From: Ranler Cao Date: Wed, 24 May 2017 15:19:13 +0800 Subject: [PATCH] Optimize the link address Use https instead of http to ensure the safety Change-Id: I459b0d0a7d53d2f87d76a1046b304b14985ca93e Signed-off-by: Ranler Cao --- setup.py | 2 +- specs/container-interactive-mode.rst | 2 +- specs/zun-api-validation.rst | 4 ++-- zun/api/app.wsgi | 2 +- zun/api/controllers/v1/__init__.py | 2 +- zun/api/http_error.py | 2 +- zun/common/i18n.py | 3 ++- zun/common/policy.py | 2 +- zun/common/utils.py | 3 ++- zun/tests/unit/api/controllers/test_root.py | 2 +- zun/tests/unit/objects/test_objects.py | 4 ++-- zun/websocket/websocketproxy.py | 2 +- 12 files changed, 16 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index 566d84432..137011c0e 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ import setuptools # In python < 2.7.4, a lazy loading of package `pbr` will break # setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 +# solution from: https://bugs.python.org/issue15881#msg170215 try: import multiprocessing # noqa except ImportError: diff --git a/specs/container-interactive-mode.rst b/specs/container-interactive-mode.rst index f8704e15a..4142980c0 100644 --- a/specs/container-interactive-mode.rst +++ b/specs/container-interactive-mode.rst @@ -37,7 +37,7 @@ feasible way. https://github.com/kubernetes/kubernetes/pull/3763 For Kubectl interactive description, go to: -http://kubernetes.io/docs/user-guide/kubectl/kubectl_run/ +https://kubernetes.io/docs/user-guide/kubectl/kubectl_run/ Proposed change =============== diff --git a/specs/zun-api-validation.rst b/specs/zun-api-validation.rst index 319ee7e77..69c128e69 100644 --- a/specs/zun-api-validation.rst +++ b/specs/zun-api-validation.rst @@ -161,12 +161,12 @@ References Useful Links: -* [Understanding JSON Schema] (http://spacetelescope.github.io/understanding-json-schema/reference/object.html) +* [Understanding JSON Schema] (https://spacetelescope.github.io/understanding-json-schema/reference/object.html) * [Nova Validation Examples] (https://git.openstack.org/cgit/openstack/nova/tree/nova/api/validation) * [JSON Schema on PyPI] (https://pypi.python.org/pypi/jsonschema) -* [JSON Schema core definitions and terminology] (http://tools.ietf.org/html/draft-zyp-json-schema-04) +* [JSON Schema core definitions and terminology] (https://tools.ietf.org/html/draft-zyp-json-schema-04) * [JSON Schema Documentation] (http://json-schema.org/documentation.html) diff --git a/zun/api/app.wsgi b/zun/api/app.wsgi index 438e327cc..6f263f0ed 100644 --- a/zun/api/app.wsgi +++ b/zun/api/app.wsgi @@ -11,7 +11,7 @@ # under the License. """Use this file for deploying the API under mod_wsgi. -See http://pecan.readthedocs.org/en/latest/deployment.html for details. +See https://pecan.readthedocs.org/en/latest/deployment.html for details. """ import sys diff --git a/zun/api/controllers/v1/__init__.py b/zun/api/controllers/v1/__init__.py index 24d930330..246ef4550 100644 --- a/zun/api/controllers/v1/__init__.py +++ b/zun/api/controllers/v1/__init__.py @@ -73,7 +73,7 @@ class V1(controllers_base.APIBase): v1.links = [link.make_link('self', pecan.request.host_url, 'v1', '', bookmark=True), link.make_link('describedby', - 'http://docs.openstack.org', + 'https://docs.openstack.org', 'developer/zun/dev', 'api-spec-v1.html', bookmark=True, type='text/html')] diff --git a/zun/api/http_error.py b/zun/api/http_error.py index 09ed038e4..947b9f4de 100644 --- a/zun/api/http_error.py +++ b/zun/api/http_error.py @@ -54,7 +54,7 @@ class HTTPNotAcceptableAPIVersion(exc.HTTPNotAcceptable): except ValueError: pass - links = {'rel': 'help', 'href': 'http://developer.openstack.org' + links = {'rel': 'help', 'href': 'https://developer.openstack.org' '/api-guide/compute/microversions.html'} err['max_version'] = self.max_version diff --git a/zun/common/i18n.py b/zun/common/i18n.py index 10c00e7c1..c0b7b73b9 100644 --- a/zun/common/i18n.py +++ b/zun/common/i18n.py @@ -14,7 +14,8 @@ # limitations under the License. # It's based on oslo.i18n usage in OpenStack Keystone project and -# recommendations from http://docs.openstack.org/developer/oslo.i18n/usage.html +# recommendations from +# https://docs.openstack.org/developer/oslo.i18n/usage.html import oslo_i18n diff --git a/zun/common/policy.py b/zun/common/policy.py index 8b1ae7145..1dae5d317 100644 --- a/zun/common/policy.py +++ b/zun/common/policy.py @@ -48,7 +48,7 @@ def init(policy_file=None, rules=None, """ global _ENFORCER if not _ENFORCER: - # http://docs.openstack.org/developer/oslo.policy/usage.html + # https://docs.openstack.org/developer/oslo.policy/usage.html _ENFORCER = policy.Enforcer(CONF, policy_file=policy_file, rules=rules, diff --git a/zun/common/utils.py b/zun/common/utils.py index 24f7eb31c..d474a2cd1 100644 --- a/zun/common/utils.py +++ b/zun/common/utils.py @@ -12,7 +12,8 @@ # limitations under the License. # It's based on oslo.i18n usage in OpenStack Keystone project and -# recommendations from http://docs.openstack.org/developer/oslo.i18n/usage.html +# recommendations from +# https://docs.openstack.org/developer/oslo.i18n/usage.html """Utilities and helper functions.""" import eventlet diff --git a/zun/tests/unit/api/controllers/test_root.py b/zun/tests/unit/api/controllers/test_root.py index 47b25e16e..eeb9b2368 100644 --- a/zun/tests/unit/api/controllers/test_root.py +++ b/zun/tests/unit/api/controllers/test_root.py @@ -44,7 +44,7 @@ class TestRootController(api_base.FunctionalTest): u'links': [{u'href': u'http://localhost/v1/', u'rel': u'self'}, {u'href': - u'http://docs.openstack.org/developer' + u'https://docs.openstack.org/developer' '/zun/dev/api-spec-v1.html', u'type': u'text/html', u'rel': u'describedby'}], u'services': [{u'href': u'http://localhost/v1/services/', diff --git a/zun/tests/unit/objects/test_objects.py b/zun/tests/unit/objects/test_objects.py index 578c0e752..1c9272b44 100644 --- a/zun/tests/unit/objects/test_objects.py +++ b/zun/tests/unit/objects/test_objects.py @@ -352,7 +352,7 @@ class TestObject(test_base.TestCase, _TestObject): # object (fields and remotable methods). If either the version or hash # change, the static tree needs to be updated. # For more information on object version testing, read -# http://docs.openstack.org/developer/zun/objects.html +# https://docs.openstack.org/developer/zun/objects.html object_data = { 'Container': '1.17-dd8ca54832bf3a0ff78249a5a0ab4143', 'Image': '1.0-0b976be24f4f6ee0d526e5c981ce0633', @@ -380,7 +380,7 @@ class TestObjectVersions(test_base.TestCase): "changed. Make sure the versions of the objects has " "been bumped, and update the hashes in the static " "fingerprints tree (object_data). For more " - "information, read http://docs.openstack.org/" + "information, read https://docs.openstack.org/" "developer/zun/objects.html.") diff --git a/zun/websocket/websocketproxy.py b/zun/websocket/websocketproxy.py index 2e6cdb9e7..0c74aabbd 100644 --- a/zun/websocket/websocketproxy.py +++ b/zun/websocket/websocketproxy.py @@ -180,7 +180,7 @@ class ZunProxyRequestHandlerBase(object): parse = urlparse.urlparse(self.path) if parse.scheme not in ('http', 'https'): # From a bug in urlparse in Python < 2.7.4 we cannot support - # special schemes (cf: http://bugs.python.org/issue9374) + # special schemes (cf: https://bugs.python.org/issue9374) if sys.version_info < (2, 7, 4): raise exception.ZunException( _("We do not support scheme '%s' under Python < 2.7.4, "