self.vim_uuid = vim_account["vim_uuid"]
self.org_name = vim_account["orgname"]
self.vim_project_id = vim_account["project_id"]
+ self.verify_ssl = vim_account.get("insecure", False)
def connect_vim_as_admin(self):
"""Method connect as pvdc admin user to vCloud director.
admin_user = self.admin_username
admin_passwd = self.admin_password
org = "System"
- client = Client(host, verify_ssl_certs=False)
+ client = Client(host, verify_ssl_certs=self.verify_ssl)
client.set_highest_supported_version()
client.set_credentials(BasicLoginCredentials(admin_user, org, admin_passwd))
return client
],
}
- response = requests.get(url=url, headers=headers, verify=False)
+ response = requests.get(
+ url=url, headers=headers, verify=self.verify_ssl
+ )
if (
response.status_code != requests.codes.ok
],
}
- response = requests.get(url=url, headers=headers, verify=False)
+ response = requests.get(
+ url=url, headers=headers, verify=self.verify_ssl
+ )
if (
response.status_code != requests.codes.ok
metrics.append(vim_status_metric)
vnfrs = self.common_db.get_vnfrs(vim_account_id=vim_account_id)
if self.conf.get("collector", "vm_infra_metrics"):
- vm_infra_metrics_enabled = str(self.conf.get("collector", "vm_infra_metrics")).lower() in ("yes", "true", "1")
+ vm_infra_metrics_enabled = str(
+ self.conf.get("collector", "vm_infra_metrics")
+ ).lower() in ("yes", "true", "1")
else:
vm_infra_metrics_enabled = True
if vm_infra_metrics_enabled: