Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/openstack_observer/steps/sync_container.py b/xos/openstack_observer/steps/sync_container.py
index f83da02..272e5f8 100644
--- a/xos/openstack_observer/steps/sync_container.py
+++ b/xos/openstack_observer/steps/sync_container.py
@@ -63,6 +63,12 @@
             pd["ip"] = port.ip or ""
             pd["xos_network_id"] = port.network.id
 
+            if port.network.name == "wan_network":
+                if port.ip:
+                    (a, b, c, d) = port.ip.split('.')
+                    pd["mac"] = "02:42:%02x:%02x:%02x:%02x" % (int(a), int(b), int(c), int(d))
+
+
             if o.isolation == "container":
                 # container on bare metal
                 instance_port = self.get_instance_port(port)
diff --git a/xos/tosca/resources/onosapp.py b/xos/tosca/resources/onosapp.py
index 111cf9a..648bb09 100644
--- a/xos/tosca/resources/onosapp.py
+++ b/xos/tosca/resources/onosapp.py
@@ -43,9 +43,9 @@
             if attrs:
                 attr = attrs[0]
                 if attr.value != value:
-                    self.info("updating attribute %s" % k)
-                    attrs.value = value
-                    attrs.save()
+                    self.info("updating attribute %s" % prop_name)
+                    attr.value = value
+                    attr.save()
             else:
                 self.info("adding attribute %s" % prop_name)
                 ta = TenantAttribute(tenant=obj, name=prop_name, value=value)