1 #################### slice tag types
2 # xxx this should move to PLC/Accessors
4 # Setup default slice tag types
7 # Slice type (only vserver is supported)
9 'description': "Type of slice (e.g. vserver)",
10 'category' : 'slice/general',
15 'description': "Is a default system slice (1) or not (0 or unset)",
16 'category' : 'slice/general',
19 # Slice enabled (1) or suspended (0)
20 {'tagname': "enabled",
21 'description': "Slice enabled (1 or unset) or suspended (0)",
22 'category' : 'slice/general',
25 # Slice reference image
27 'description': "Reference image",
28 'category' : 'slice/config',
31 # Slice initialization script
32 {'tagname': "initscript",
33 'description': "Slice initialization script",
34 'category' : 'slice/config',
37 # IP Addresses for a Slice
38 {'tagname': "ip_addresses",
39 'description': "Add an ip address to a slice/sliver.",
40 'category' : 'slice/rspec',
44 {'tagname': "cpu_pct",
45 'description': "Reserved CPU percent",
46 'category' : 'slice/rspec',
48 {'tagname': "cpu_share",
49 'description': "Number of CPU shares",
50 'category' : 'slice/rspec',
54 {'tagname': "net_min_rate",
55 'description': "Minimum bandwidth (kbps)",
56 'category' : 'slice/rspec',
58 {'tagname': "net_max_rate",
59 'description': "Maximum bandwidth (kbps)",
60 'category' : 'slice/rspec',
62 {'tagname': "net_i2_min_rate",
63 'description': "Minimum bandwidth over I2 routes (kbps)",
64 'category' : 'slice/rspec',
66 {'tagname': "net_i2_max_rate",
67 'description': "Maximum bandwidth over I2 routes (kbps)",
68 'category' : 'slice/rspec',
70 {'tagname': "net_max_kbyte",
71 'description': "Maximum daily network Tx KByte limit.",
72 'category' : 'slice/rspec',
74 {'tagname': "net_thresh_kbyte",
75 'description': "KByte limit before warning and throttling.",
76 'category' : 'slice/rspec',
78 {'tagname': "net_i2_max_kbyte",
79 'description': "Maximum daily network Tx KByte limit to I2 hosts.",
80 'category' : 'slice/rspec',
82 {'tagname': "net_i2_thresh_kbyte",
83 'description': "KByte limit to I2 hosts before warning and throttling.",
84 'category' : 'slice/rspec',
86 {'tagname': "net_share",
87 'description': "Number of bandwidth shares",
88 'category' : 'slice/rspec',
90 {'tagname': "net_i2_share",
91 'description': "Number of bandwidth shares over I2 routes",
92 'category' : 'slice/rspec',
96 {'tagname': "disk_max",
97 'description': "Disk quota (1k disk blocks)",
98 'category' : 'slice/rspec',
102 {'tagname': "proper_op",
103 'description': "Proper operation (e.g. bind_socket)",
104 'category' : 'slice/rspec',
107 # VServer capabilities
108 {'tagname': "capabilities",
109 'description': "VServer bcapabilities (separate by commas)",
110 'category' : 'slice/rspec',
115 'description': "Bind vsys script fd's to a slice's vsys directory.",
116 'category' : 'slice/rspec',
120 {'tagname': "codemux",
121 'description': "Demux HTTP between slices using localhost ports. Value in the form 'host, localhost port'.",
122 'category' : 'slice/rspec',
126 {'tagname': "delegations",
127 'description': "Coma seperated list of slices to give delegation authority to.",
128 'category' : 'slice/rspec',
131 # Security capability to empower a slice to make an authenticated API call, set by silverauth NM plugin.
133 'description': "Sliver authorization key.",
134 'category' : 'slice/auth',
137 # Capability to give a sliver access to unused raw disk
138 {'tagname': "rawdisk",
139 'description': "map unused raw disk devices into the slice",
140 'category' : 'slice/access', # we should get rid of this category thing
143 { 'tagname' : 'exempt_slice_until',
144 'description' : 'Exclude this slice from MyOps until given date (YYYYMMDD)',
145 'category' : 'slice/myops',
146 'min_role_id' : 10} ,
149 # add in the platform supported rlimits to the default_attribute_types
150 for entry in resource.__dict__.keys() + ["VLIMIT_OPENFD"]:
151 if entry.find("LIMIT_")==1:
152 rlim = entry[len("RLIMIT_"):]
154 for ty in ("min","soft","hard"):
156 'tagname': "%s_%s"%(rlim,ty),
157 'description': "Per sliver RLIMIT %s_%s."%(rlim,ty),
158 'category': 'slice/limit',
159 'min_role_id': 10 #admin
161 slicetag_types.append(attribute)
163 for slicetag_type in slicetag_types:
164 SetTagType(slicetag_type)