Add metadata field to node

This commit is contained in:
vic 2012-12-11 22:40:39 +04:00 committed by default
parent 0ca32144fd
commit 26ed5c3208
1 changed files with 3 additions and 2 deletions

View File

@ -71,11 +71,12 @@ class Network(ManagedObject):
self.driver.stop_network(self)
class Node(ManagedObject):
def __init__(self, name, cpu=1, memory=512, arch='x86_64', vnc=False):
def __init__(self, name, cpu=1, memory=512, arch='x86_64', vnc=False,
metadata=None):
super(Node, self).__init__()
self.name = name
if not metadata: self.metadata = {}
self.cpu = cpu
self.memory = memory
self.arch = arch