Skip to content
Snippets Groups Projects
Commit 9df78fb0 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Changes in context

parent d573d041
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!150Resolve "(TID) Network device inventory management"
...@@ -182,9 +182,9 @@ message Component { //Defined previously to this section ...@@ -182,9 +182,9 @@ message Component { //Defined previously to this section
Uuid component_uuid = 1; Uuid component_uuid = 1;
string name = 2; string name = 2;
string type = 3; string type = 3;
repeated string child = 4; // list[sub-component.name]
map<string, string> attributes = 5; // dict[attr.name => json.dumps(attr.value)] map<string, string> attributes = 4; // dict[attr.name => json.dumps(attr.value)]
string parent = 6; string parent = 5;
} }
// ----------------------------------------------------- // -----------------------------------------------------
......
...@@ -41,7 +41,7 @@ class ComponentModel(_Base): #Inherit ...@@ -41,7 +41,7 @@ class ComponentModel(_Base): #Inherit
def dump(self) -> Dict: def dump(self) -> Dict:
data = json.loads(self.attributes) data = json.loads(self.attributes)
data['component_uuid'] = self.component_uuid data['component_uuid'] = {'uuid': self.component_uuid},
data['name'] = self.name data['name'] = self.name
data['type'] = self.type data['type'] = self.type
data['parent'] = self.parent data['parent'] = self.parent
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment