X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fvnf_collectors%2Fvmware.py;h=932240858b29e794282194519e383a3aa820a404;hb=refs%2Fchanges%2F77%2F7677%2F1;hp=557fa387939835dcf0e99695e8315f771671901d;hpb=649e6b264fb9e92103267dabd16ed9a3dbadb302;p=osm%2FMON.git diff --git a/osm_mon/collector/vnf_collectors/vmware.py b/osm_mon/collector/vnf_collectors/vmware.py index 557fa38..9322408 100644 --- a/osm_mon/collector/vnf_collectors/vmware.py +++ b/osm_mon/collector/vnf_collectors/vmware.py @@ -32,15 +32,15 @@ import six from pyvcloud.vcd.client import BasicLoginCredentials from pyvcloud.vcd.client import Client +from osm_mon.collector.utils 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, @@ -67,7 +67,6 @@ class VMwareCollector(BaseVimCollector): 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'] @@ -113,7 +112,7 @@ class VMwareCollector(BaseVimCollector): 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