aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/core/resource_mgr.py
diff options
context:
space:
mode:
authorMarcel Enguehard <mengueha+fdio@cisco.com>2017-05-15 16:26:27 +0200
committerMarcel Enguehard <mengueha+fdio@cisco.com>2017-05-15 16:26:27 +0200
commit895a6328d6e64948ed213e8fbbb3ab15aca0df43 (patch)
tree2c85049fcf73c445ea25097b4753299568061538 /vicn/core/resource_mgr.py
parent548479d60dafb24eddcec3762aa558f13581cdb2 (diff)
IPv6 dataplane support + Decentralized IPv4 prefix attribution + Bug fix for attribute default values handling + Various fixes
Change-Id: I0a26eda064d9e22d9d55fd568748076148f49645 Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/core/resource_mgr.py')
-rw-r--r--vicn/core/resource_mgr.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/vicn/core/resource_mgr.py b/vicn/core/resource_mgr.py
index b750f555..c6ce77ab 100644
--- a/vicn/core/resource_mgr.py
+++ b/vicn/core/resource_mgr.py
@@ -902,8 +902,8 @@ class ResourceManager(metaclass=Singleton):
new_state = AttributeState.INITIALIZED
elif pending_state == AttributeState.PENDING_UPDATE:
+ attrs = resource._state.attr_change_value[attribute.name]
if resource._state.attr_change_success[attribute.name] == True:
- attrs = resource._state.attr_change_value[attribute.name]
self.attr_log(resource, attribute,
'UPDATE success. Value = {}. Attribute is CLEAN'.format(attrs))
if attrs != NEVER_SET:
@@ -934,6 +934,8 @@ class ResourceManager(metaclass=Singleton):
resource.get_uuid(), attribute.name))
e = resource._state.attr_change_value[attribute.name]
new_state = AttributeState.ERROR
+ import traceback; traceback.print_tb(e.__traceback__)
+ import os; os._exit(1)
else:
raise RuntimeError
@@ -954,7 +956,7 @@ class ResourceManager(metaclass=Singleton):
return Query.from_dict(dic)
def _monitor_netmon(self, resource):
- ip = resource.node.host_interface.ip_address
+ ip = resource.node.host_interface.ip4_address
if not ip:
log.error('IP of monitored Node is None')
import os; os._exit(1)
@@ -1007,7 +1009,7 @@ class ResourceManager(metaclass=Singleton):
def _monitor_emulator(self, resource):
ns = resource
- ip = ns.node.bridge.ip_address # host_interface.ip_address
+ ip = ns.node.bridge.ip4_address # host_interface.ip_address
ws_ns = self._router.add_interface('websocketclient', address = ip,
port = ns.control_port,
@@ -1356,8 +1358,10 @@ class ResourceManager(metaclass=Singleton):
new_state = ResourceState.INITIALIZED
else:
e = resource._state.change_value
+ import traceback; traceback.print_tb(e.__traceback__)
log.error('Cannot setup resource {} : {}'.format(
resource.get_uuid(), e))
+ import os; os._exit(1)
elif pending_state == ResourceState.PENDING_GET:
if resource._state.change_success == True: