|
|
|
@ -318,7 +318,7 @@ class ACIModule(object):
|
|
|
|
|
self.url = '%(protocol)s://%(host)s/' % self.params + path.lstrip('/')
|
|
|
|
|
|
|
|
|
|
# Sign and encode request as to APIC's wishes
|
|
|
|
|
if not self.params['private_key']:
|
|
|
|
|
if self.params['private_key']:
|
|
|
|
|
self.cert_auth(path=path, payload=payload)
|
|
|
|
|
|
|
|
|
|
# Perform request
|
|
|
|
@ -355,7 +355,7 @@ class ACIModule(object):
|
|
|
|
|
self.url = '%(protocol)s://%(host)s/' % self.params + path.lstrip('/')
|
|
|
|
|
|
|
|
|
|
# Sign and encode request as to APIC's wishes
|
|
|
|
|
if not self.params['private_key']:
|
|
|
|
|
if self.params['private_key']:
|
|
|
|
|
self.cert_auth(path=path, method='GET')
|
|
|
|
|
|
|
|
|
|
# Perform request
|
|
|
|
@ -642,7 +642,7 @@ class ACIModule(object):
|
|
|
|
|
|
|
|
|
|
elif not self.module.check_mode:
|
|
|
|
|
# Sign and encode request as to APIC's wishes
|
|
|
|
|
if not self.params['private_key']:
|
|
|
|
|
if self.params['private_key']:
|
|
|
|
|
self.cert_auth(method='DELETE')
|
|
|
|
|
|
|
|
|
|
resp, info = fetch_url(self.module, self.url,
|
|
|
|
@ -778,7 +778,7 @@ class ACIModule(object):
|
|
|
|
|
uri = self.url + self.filter_string
|
|
|
|
|
|
|
|
|
|
# Sign and encode request as to APIC's wishes
|
|
|
|
|
if not self.params['private_key']:
|
|
|
|
|
if self.params['private_key']:
|
|
|
|
|
self.cert_auth(path=self.path + self.filter_string, method='GET')
|
|
|
|
|
|
|
|
|
|
resp, info = fetch_url(self.module, uri,
|
|
|
|
@ -879,7 +879,7 @@ class ACIModule(object):
|
|
|
|
|
return
|
|
|
|
|
elif not self.module.check_mode:
|
|
|
|
|
# Sign and encode request as to APIC's wishes
|
|
|
|
|
if not self.params['private_key']:
|
|
|
|
|
if self.params['private_key']:
|
|
|
|
|
self.cert_auth(method='POST', payload=json.dumps(self.config))
|
|
|
|
|
|
|
|
|
|
resp, info = fetch_url(self.module, self.url,
|
|
|
|
|