Skip to content

Commit 0e6dd58

Browse files
committed
Fix create URLs
1 parent 442b18d commit 0e6dd58

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

client/contivModelClient.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, baseUrl):
7474
self.baseUrl = baseUrl
7575
# Create appProfile
7676
def createAppProfile(self, obj):
77-
postUrl = self.baseUrl + '/api/AppProfiles/' + obj.tenantName + ":" + obj.networkName + ":" + obj.appProfileName + '/'
77+
postUrl = self.baseUrl + '/api/appProfiles/' + obj.tenantName + ":" + obj.networkName + ":" + obj.appProfileName + '/'
7878

7979
jdata = json.dumps({
8080
"appProfileName": obj.appProfileName,
@@ -108,7 +108,7 @@ def listAppProfile(self):
108108
return json.loads(retData)
109109
# Create endpointGroup
110110
def createEndpointGroup(self, obj):
111-
postUrl = self.baseUrl + '/api/EndpointGroups/' + obj.tenantName + ":" + obj.networkName + ":" + obj.groupName + '/'
111+
postUrl = self.baseUrl + '/api/endpointGroups/' + obj.tenantName + ":" + obj.networkName + ":" + obj.groupName + '/'
112112

113113
jdata = json.dumps({
114114
"endpointGroupId": obj.endpointGroupId,
@@ -143,7 +143,7 @@ def listEndpointGroup(self):
143143
return json.loads(retData)
144144
# Create global
145145
def createGlobal(self, obj):
146-
postUrl = self.baseUrl + '/api/Globals/' + obj.name + '/'
146+
postUrl = self.baseUrl + '/api/globals/' + obj.name + '/'
147147

148148
jdata = json.dumps({
149149
"name": obj.name,
@@ -212,7 +212,7 @@ def listBgp(self):
212212
return json.loads(retData)
213213
# Create network
214214
def createNetwork(self, obj):
215-
postUrl = self.baseUrl + '/api/Networks/' + obj.tenantName + ":" + obj.networkName + '/'
215+
postUrl = self.baseUrl + '/api/networks/' + obj.tenantName + ":" + obj.networkName + '/'
216216

217217
jdata = json.dumps({
218218
"encap": obj.encap,
@@ -248,7 +248,7 @@ def listNetwork(self):
248248
return json.loads(retData)
249249
# Create policy
250250
def createPolicy(self, obj):
251-
postUrl = self.baseUrl + '/api/Policys/' + obj.tenantName + ":" + obj.policyName + '/'
251+
postUrl = self.baseUrl + '/api/policys/' + obj.tenantName + ":" + obj.policyName + '/'
252252

253253
jdata = json.dumps({
254254
"policyName": obj.policyName,
@@ -280,7 +280,7 @@ def listPolicy(self):
280280
return json.loads(retData)
281281
# Create rule
282282
def createRule(self, obj):
283-
postUrl = self.baseUrl + '/api/Rules/' + obj.tenantName + ":" + obj.policyName + ":" + obj.ruleId + '/'
283+
postUrl = self.baseUrl + '/api/rules/' + obj.tenantName + ":" + obj.policyName + ":" + obj.ruleId + '/'
284284

285285
jdata = json.dumps({
286286
"action": obj.action,
@@ -324,7 +324,7 @@ def listRule(self):
324324
return json.loads(retData)
325325
# Create service
326326
def createService(self, obj):
327-
postUrl = self.baseUrl + '/api/Services/' + obj.tenantName + ":" + obj.appName + ":" + obj.serviceName + '/'
327+
postUrl = self.baseUrl + '/api/services/' + obj.tenantName + ":" + obj.appName + ":" + obj.serviceName + '/'
328328

329329
jdata = json.dumps({
330330
"appName": obj.appName,
@@ -366,7 +366,7 @@ def listService(self):
366366
return json.loads(retData)
367367
# Create serviceInstance
368368
def createServiceInstance(self, obj):
369-
postUrl = self.baseUrl + '/api/ServiceInstances/' + obj.tenantName + ":" + obj.appName + ":" + obj.serviceName + ":" + obj.instanceId + '/'
369+
postUrl = self.baseUrl + '/api/serviceInstances/' + obj.tenantName + ":" + obj.appName + ":" + obj.serviceName + ":" + obj.instanceId + '/'
370370

371371
jdata = json.dumps({
372372
"appName": obj.appName,
@@ -401,7 +401,7 @@ def listServiceInstance(self):
401401
return json.loads(retData)
402402
# Create tenant
403403
def createTenant(self, obj):
404-
postUrl = self.baseUrl + '/api/Tenants/' + obj.tenantName + '/'
404+
postUrl = self.baseUrl + '/api/tenants/' + obj.tenantName + '/'
405405

406406
jdata = json.dumps({
407407
"defaultNetwork": obj.defaultNetwork,
@@ -433,7 +433,7 @@ def listTenant(self):
433433
return json.loads(retData)
434434
# Create volume
435435
def createVolume(self, obj):
436-
postUrl = self.baseUrl + '/api/Volumes/' + obj.tenantName + ":" + obj.volumeName + '/'
436+
postUrl = self.baseUrl + '/api/volumes/' + obj.tenantName + ":" + obj.volumeName + '/'
437437

438438
jdata = json.dumps({
439439
"datastoreType": obj.datastoreType,
@@ -469,7 +469,7 @@ def listVolume(self):
469469
return json.loads(retData)
470470
# Create volumeProfile
471471
def createVolumeProfile(self, obj):
472-
postUrl = self.baseUrl + '/api/VolumeProfiles/' + obj.tenantName + ":" + obj.volumeProfileName + '/'
472+
postUrl = self.baseUrl + '/api/volumeProfiles/' + obj.tenantName + ":" + obj.volumeProfileName + '/'
473473

474474
jdata = json.dumps({
475475
"datastoreType": obj.datastoreType,

0 commit comments

Comments
 (0)