# -*- coding: utf-8 -*-
##
-# Copyright 2016-2017 VMware Inc.
+# Copyright 2016-2019 VMware Inc.
# This file is part of ETSI OSM
# All Rights Reserved.
#
from pyvcloud.vcd.client import BasicLoginCredentials
from pyvcloud.vcd.client import Client
+from osm_mon.collector.utils.collector import CollectorUtils
from osm_mon.collector.vnf_collectors.base_vim import BaseVimCollector
from osm_mon.collector.vnf_metric import VnfMetric
-from osm_mon.core.auth import AuthManager
from osm_mon.core.common_db import CommonDbClient
from osm_mon.core.config import Config
log = logging.getLogger(__name__)
-API_VERSION = '5.9'
+API_VERSION = '27.0'
PERIOD_MSEC = {'HR': 3600000,
'DAY': 86400000,
def __init__(self, config: Config, vim_account_id: str):
super().__init__(config, vim_account_id)
self.common_db = CommonDbClient(config)
- self.auth_manager = AuthManager(config)
vim_account = self.get_vim_account(vim_account_id)
self.vrops_site = vim_account['vrops_site']
self.vrops_user = vim_account['vrops_user']
admin_passwd = self.admin_password
org = 'System'
client = Client(host, verify_ssl_certs=False)
+ client.set_highest_supported_version()
client.set_credentials(BasicLoginCredentials(admin_user, org,
admin_passwd))
return client
return - dict with vim account details
"""
vim_account = {}
- vim_account_info = self.auth_manager.get_credentials(vim_account_id)
+ vim_account_info = CollectorUtils.get_credentials(vim_account_id)
vim_account['name'] = vim_account_info.name
vim_account['vim_tenant_name'] = vim_account_info.tenant_name