Somewhat working
This commit is contained in:
@@ -35,8 +35,8 @@ class OpenStackConnection_x:
|
||||
self.ks=myopenstack_keystone(self)
|
||||
self.nova=myopenstack_nova(self)
|
||||
self.neutron=myopenstack_neutron(self)
|
||||
self.cinder-myopenstack_cinder(self)
|
||||
|
||||
self.cinder=myopenstack_cinder(self)
|
||||
|
||||
self.interface=os.getenv("OS_INTERFACE")
|
||||
|
||||
|
||||
@@ -71,11 +71,11 @@ class OpenStackConnection_x:
|
||||
url = apiEndpoint + "/" + url
|
||||
|
||||
if getPost=="GET":
|
||||
response = requests.get(url, headers=headers)
|
||||
response = requests.get(url, headers=headers,timeout=15)
|
||||
elif getPost=="POST":
|
||||
response = requests.post(url, data=data_json, headers=headers)
|
||||
response = requests.post(url, data=data_json, headers=headers,timeout=15)
|
||||
elif getPost=="DELETE":
|
||||
response = requests.delete(url, headers=headers)
|
||||
response = requests.delete(url, headers=headers,timeout=15)
|
||||
else:
|
||||
raise ValueError("Unknown request type")
|
||||
|
||||
@@ -118,12 +118,12 @@ class OpenStackConnection_x:
|
||||
}
|
||||
}
|
||||
|
||||
response = requests.post(url)
|
||||
# response = requests.post(url)
|
||||
headers = {'Content-type': 'application/json'}
|
||||
response = requests.post(url, headers=headers,
|
||||
data=json.dumps(xdata),
|
||||
verify=False,
|
||||
timeout=4)
|
||||
timeout=15)
|
||||
|
||||
if response.status_code == 201:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user