Add seed code for python-ilorest-library
[ta/python-ilorest-library.git] / 0001-initial.patch
diff --git a/0001-initial.patch b/0001-initial.patch
new file mode 100644 (file)
index 0000000..a3bd0df
--- /dev/null
@@ -0,0 +1,82 @@
+diff --git a/.gitignore b/.gitignore
+index 1de4c0e..eb58996 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -27,7 +27,6 @@ var/
+ #  Usually these files are written by a python script from a template\r
+ #  before PyInstaller builds the exe, so as to inject date/other infos into it.\r
+ *.manifest\r
+-*.spec\r
\r
+ # Installer logs\r
+ pip-log.txt\r
+diff --git a/requirements.txt b/requirements.txt
+index 9b9f66a..0f6adff 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -2,5 +2,4 @@ jsonpatch
+ jsonpath_rw\r
+ jsonpointer\r
+ validictory\r
+-urlparse2\r
+ six\r
+diff --git a/setup.cfg b/setup.cfg
+index 554736f..6ea1209 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -5,6 +5,5 @@ description-file = README.rst
+ requires = jsonpatch >= 1.3
+       jsonpath-rw >= 1.3.0
+       jsonpointer >= 1.1
+-      urlparse2 >= 1.1.1
+       validictory >= 1.0.1
+-      ilorest_chif >= 2.3
+\ No newline at end of file
++      ilorest_chif >= 2.3
+diff --git a/setup.py b/setup.py
+index 3f97911..59cc4fd 100644
+--- a/setup.py
++++ b/setup.py
+@@ -21,6 +21,5 @@ setup(name='python-ilorest-library',
+           'jsonpath_rw',\r
+           'jsonpointer',\r
+           'validictory',\r
+-          'urlparse2',\r
+           'six'\r
+       ])\r
+diff --git a/src/redfish/rest/v1.py b/src/redfish/rest/v1.py
+index e6816a9..d851425 100644
+--- a/src/redfish/rest/v1.py
++++ b/src/redfish/rest/v1.py
+@@ -535,7 +535,8 @@ class RestClientBase(object):
+         url = url if url else self.__url\r
+         if url.scheme.upper() == "HTTPS":\r
+             if sys.version_info < (2, 7, 9):\r
+-                self._conn = http_client.HTTPSConnection(url.netloc, timeout=30)\r
++                self._conn = http_client.HTTPSConnection(url.netloc, \\r
++                    context=ssl._create_unverified_context(), timeout=30)\r
+             else:\r
+                 self._conn = http_client.HTTPSConnection(url.netloc, \\r
+                     context=ssl._create_unverified_context(), timeout=30)\r
+diff --git a/src/redfish/ris/rmc_helper.py b/src/redfish/ris/rmc_helper.py
+index e30ad19..78c4caa 100644
+--- a/src/redfish/ris/rmc_helper.py
++++ b/src/redfish/ris/rmc_helper.py
+@@ -24,7 +24,7 @@ import json
+ import errno\r
+ import logging\r
+ import hashlib\r
+-import urlparse2\r
++import urlparse\r
+ import redfish.rest\r
\r
+ from .ris import (RisMonolith)\r
+@@ -233,7 +233,7 @@ class RmcClient(object):
\r
+     def get_cache_dirname(self):\r
+         """The rest client's current base URL converted to path"""\r
+-        parts = urlparse2.urlparse(self.get_base_url())\r
++        parts = urlparse.urlparse(self.get_base_url())\r
+         pathstr = '%s/%s' % (parts.netloc, parts.path)\r
+         return pathstr.replace('//', '/')\r
\r