Add seed code for python-ilorest-library
[ta/python-ilorest-library.git] / 0001-initial.patch
1 diff --git a/.gitignore b/.gitignore
2 index 1de4c0e..eb58996 100644
3 --- a/.gitignore
4 +++ b/.gitignore
5 @@ -27,7 +27,6 @@ var/
6  #  Usually these files are written by a python script from a template\r
7  #  before PyInstaller builds the exe, so as to inject date/other infos into it.\r
8  *.manifest\r
9 -*.spec\r
10  \r
11  # Installer logs\r
12  pip-log.txt\r
13 diff --git a/requirements.txt b/requirements.txt
14 index 9b9f66a..0f6adff 100644
15 --- a/requirements.txt
16 +++ b/requirements.txt
17 @@ -2,5 +2,4 @@ jsonpatch
18  jsonpath_rw\r
19  jsonpointer\r
20  validictory\r
21 -urlparse2\r
22  six\r
23 diff --git a/setup.cfg b/setup.cfg
24 index 554736f..6ea1209 100644
25 --- a/setup.cfg
26 +++ b/setup.cfg
27 @@ -5,6 +5,5 @@ description-file = README.rst
28  requires = jsonpatch >= 1.3
29         jsonpath-rw >= 1.3.0
30         jsonpointer >= 1.1
31 -       urlparse2 >= 1.1.1
32         validictory >= 1.0.1
33 -       ilorest_chif >= 2.3
34 \ No newline at end of file
35 +       ilorest_chif >= 2.3
36 diff --git a/setup.py b/setup.py
37 index 3f97911..59cc4fd 100644
38 --- a/setup.py
39 +++ b/setup.py
40 @@ -21,6 +21,5 @@ setup(name='python-ilorest-library',
41            'jsonpath_rw',\r
42            'jsonpointer',\r
43            'validictory',\r
44 -          'urlparse2',\r
45            'six'\r
46        ])\r
47 diff --git a/src/redfish/rest/v1.py b/src/redfish/rest/v1.py
48 index e6816a9..d851425 100644
49 --- a/src/redfish/rest/v1.py
50 +++ b/src/redfish/rest/v1.py
51 @@ -535,7 +535,8 @@ class RestClientBase(object):
52          url = url if url else self.__url\r
53          if url.scheme.upper() == "HTTPS":\r
54              if sys.version_info < (2, 7, 9):\r
55 -                self._conn = http_client.HTTPSConnection(url.netloc, timeout=30)\r
56 +                self._conn = http_client.HTTPSConnection(url.netloc, \\r
57 +                    context=ssl._create_unverified_context(), timeout=30)\r
58              else:\r
59                  self._conn = http_client.HTTPSConnection(url.netloc, \\r
60                      context=ssl._create_unverified_context(), timeout=30)\r
61 diff --git a/src/redfish/ris/rmc_helper.py b/src/redfish/ris/rmc_helper.py
62 index e30ad19..78c4caa 100644
63 --- a/src/redfish/ris/rmc_helper.py
64 +++ b/src/redfish/ris/rmc_helper.py
65 @@ -24,7 +24,7 @@ import json
66  import errno\r
67  import logging\r
68  import hashlib\r
69 -import urlparse2\r
70 +import urlparse\r
71  import redfish.rest\r
72  \r
73  from .ris import (RisMonolith)\r
74 @@ -233,7 +233,7 @@ class RmcClient(object):
75  \r
76      def get_cache_dirname(self):\r
77          """The rest client's current base URL converted to path"""\r
78 -        parts = urlparse2.urlparse(self.get_base_url())\r
79 +        parts = urlparse.urlparse(self.get_base_url())\r
80          pathstr = '%s/%s' % (parts.netloc, parts.path)\r
81          return pathstr.replace('//', '/')\r
82  \r