diff options
author | Marcel Enguehard <mengueha+fdio@cisco.com> | 2017-07-19 11:26:26 +0200 |
---|---|---|
committer | Marcel Enguehard <mengueha+fdio@cisco.com> | 2017-07-19 11:51:26 +0000 |
commit | 3e6678f9c692553e8902da4d6fb1fe6c087db1f4 (patch) | |
tree | 580a46ca5de22a044319eabb295ad980d50589ec /vicn/resource/node.py | |
parent | 08c4f765cf29dbd6e9a616c542552417eece14fc (diff) |
* GUI resource
* MemIf interface for VPP
* Better netmodel integration
* Draft documentation
* New tutorials
* Improved monitoring and error handling
* Refactored IP addresses and prefixes representation
* Improved image mgmt for LXD
* Various bugfixes and code refactoring
Change-Id: I90da6cf7b5716bc7deb6bf4e24d3f9f01b5a9b0f
Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/resource/node.py')
-rw-r--r-- | vicn/resource/node.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/vicn/resource/node.py b/vicn/resource/node.py index c785e32b..3805677e 100644 --- a/vicn/resource/node.py +++ b/vicn/resource/node.py @@ -32,6 +32,10 @@ DEFAULT_SSH_PRIVATE_KEY = os.path.expanduser(os.path.join( DEFAULT_SSH_PUBLIC_KEY = os.path.expanduser(os.path.join( '~', '.vicn', 'ssh_client_cert', 'ssh_client_key.pub')) +OS = String.restrict(choices=('debian', 'ubuntu')) +Distribution = String.restrict(choices=('trusty', 'xenial', 'sid')) +Architecture = String.restrict(choices=('amd64')) + class Node(Resource): """ Resource: Node @@ -42,15 +46,13 @@ class Node(Resource): y = Attribute(Double, description = 'Y coordinate', default = 0.0) category = Attribute(String) - os = Attribute(String, description = 'OS', - default = 'ubuntu', - choices = ['debian', 'ubuntu']) - dist = Attribute(String, description = 'Distribution name', - default = 'xenial', - choices = ['trusty', 'xenial', 'sid']) - arch = Attribute(String, description = 'Architecture', - default = 'amd64', - choices = ['amd64']) + scale = Attribute(Double, default = 1) + os = Attribute(OS, description = 'OS', + default = 'ubuntu') + dist = Attribute(Distribution, description = 'Distribution name', + default = 'xenial') + arch = Attribute(Architecture, description = 'Architecture', + default = 'amd64') node_with_kernel = Attribute(Self, description = 'Node on which the kernel sits', ro = True) |