vcenter (11):pyVmomi.VmomiSupport.vim.fault.NotAuthenticated

当调用pyVmomi 的 API时,如果DEBUG模式下调整了代码,并且调试的过程中出现了语法错误,则会出现以下的场景:

'vim.dvs.DistributedVirtualPortgroup:dvportgroup-326'
2020-07-06 15:49:38:535604: Traceback (most recent call last):
2020-07-06 15:49:39:062195:   File "E:\work_space\warclouds\version01\openstack_api_server\app.py", line 3, in 
2020-07-06 15:49:39:062195:     from _app import app
2020-07-06 15:49:39:063193:   File "E:\work_space\warclouds\version01\openstack_api_server\_app.py", line 11, in 
2020-07-06 15:49:39:063193:     from cloudenforce.DB_TimerTask.DBTimerConfig import DBTimerConfig
2020-07-06 15:49:39:064190: ImportError: cannot import name 'DBTimerConfig'
2020-07-06 15:49:39:064190: Job "job2 (trigger: interval[0:01:00], next run at: 2020-07-06 15:50:35 CST)" raised an exception
2020-07-06 15:49:39:336461: Traceback (most recent call last):
2020-07-06 15:49:39:336461:   File "E:\work_space\warclouds\version01\openstack_api_server\venv\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job
2020-07-06 15:49:39:336461:     retval = job.func(*job.args, **job.kwargs)
2020-07-06 15:49:39:336461:   File "E:/work_space/warclouds/version01/openstack_api_server/app.py", line 88, in vcenter_db_refresh
2020-07-06 15:49:39:336461:     data_list.append(detail_network_port(network))
2020-07-06 15:49:39:336461:   File "E:\work_space\warclouds\version01\openstack_api_server\cloudenforce\vmware_api\vcenter_detail\detail_network_port.py", line 267, in detail_network_port
2020-07-06 15:49:39:336461:     'inherited'] = network.config.defaultPortConfig.vlan.inherited
2020-07-06 15:49:39:336461:   File "e:\python36\lib\site-packages\pyVmomi\VmomiSupport.py", line 700, in __call__
2020-07-06 15:49:39:336461:     return self.f(*args, **kwargs)
2020-07-06 15:49:39:336461:   File "e:\python36\lib\site-packages\pyVmomi\VmomiSupport.py", line 520, in _InvokeAccessor
2020-07-06 15:49:39:336461:     return self._stub.InvokeAccessor(self, info)
2020-07-06 15:49:39:336461:   File "e:\python36\lib\site-packages\pyVmomi\StubAdapterAccessorImpl.py", line 47, in InvokeAccessor
2020-07-06 15:49:39:336461:     raise objectContent.missingSet[0].fault
2020-07-06 15:49:39:336461: pyVmomi.VmomiSupport.vim.fault.NotAuthenticated: (vim.fault.NotAuthenticated) {
2020-07-06 15:49:39:336461:    dynamicType = ,
2020-07-06 15:49:39:336461:    dynamicProperty = (vmodl.DynamicProperty) [],
2020-07-06 15:49:39:336461:    msg = '',
2020-07-06 15:49:39:336461:    faultCause = ,
2020-07-06 15:49:39:336461:    faultMessage = (vmodl.LocalizableMessage) [],
2020-07-06 15:49:39:336461:    object = 'vim.dvs.DistributedVirtualPortgroup:dvportgroup-396',
2020-07-06 15:49:39:336461:    privilegeId = 'System.Read'
2020-07-06 15:49:39:336461: }

 

你可能感兴趣的:(vCenter)