4 #################### slice tag types
5 # xxx this should move to PLC/Accessors
7 # Setup default slice tag types
10 # Slice type (only vserver is supported)
12 'description': "Type of slice (e.g. vserver)",
13 'category' : 'slice/general',
18 'description': "Is a default system slice (1) or not (0 or unset)",
19 'category' : 'slice/general',
22 # Slice enabled (1) or suspended (0)
23 {'tagname': "enabled",
24 'description': "Slice enabled (1 or unset) or suspended (0)",
25 'category' : 'slice/general',
28 # Slice reference image
30 'description': "Reference image",
31 'category' : 'slice/config',
34 # Slice initialization script
35 {'tagname': "initscript",
36 'description': "Slice initialization script",
37 'category' : 'slice/config',
40 # IP Addresses for a Slice
41 {'tagname': "ip_addresses",
42 'description': "Add an ip address to a slice/sliver.",
43 'category' : 'slice/rspec',
47 {'tagname': "cpu_pct",
48 'description': "Reserved CPU percent",
49 'category' : 'slice/rspec',
51 {'tagname': "cpu_share",
52 'description': "Number of CPU shares",
53 'category' : 'slice/rspec',
57 {'tagname': "net_min_rate",
58 'description': "Minimum bandwidth (kbps)",
59 'category' : 'slice/rspec',
61 {'tagname': "net_max_rate",
62 'description': "Maximum bandwidth (kbps)",
63 'category' : 'slice/rspec',
65 {'tagname': "net_i2_min_rate",
66 'description': "Minimum bandwidth over I2 routes (kbps)",
67 'category' : 'slice/rspec',
69 {'tagname': "net_i2_max_rate",
70 'description': "Maximum bandwidth over I2 routes (kbps)",
71 'category' : 'slice/rspec',
73 {'tagname': "net_max_kbyte",
74 'description': "Maximum daily network Tx KByte limit.",
75 'category' : 'slice/rspec',
77 {'tagname': "net_thresh_kbyte",
78 'description': "KByte limit before warning and throttling.",
79 'category' : 'slice/rspec',
81 {'tagname': "net_i2_max_kbyte",
82 'description': "Maximum daily network Tx KByte limit to I2 hosts.",
83 'category' : 'slice/rspec',
85 {'tagname': "net_i2_thresh_kbyte",
86 'description': "KByte limit to I2 hosts before warning and throttling.",
87 'category' : 'slice/rspec',
89 {'tagname': "net_share",
90 'description': "Number of bandwidth shares",
91 'category' : 'slice/rspec',
93 {'tagname': "net_i2_share",
94 'description': "Number of bandwidth shares over I2 routes",
95 'category' : 'slice/rspec',
99 {'tagname': "disk_max",
100 'description': "Disk quota (1k disk blocks)",
101 'category' : 'slice/rspec',
105 {'tagname': "proper_op",
106 'description': "Proper operation (e.g. bind_socket)",
107 'category' : 'slice/rspec',
110 # VServer capabilities
111 {'tagname': "capabilities",
112 'description': "VServer bcapabilities (separate by commas)",
113 'category' : 'slice/rspec',
118 'description': "Bind vsys script fd's to a slice's vsys directory.",
119 'category' : 'slice/rspec',
123 {'tagname': "codemux",
124 'description': "Demux HTTP between slices using localhost ports. Value in the form 'host, localhost port'.",
125 'category' : 'slice/rspec',
129 {'tagname': "delegations",
130 'description': "Coma seperated list of slices to give delegation authority to.",
131 'category' : 'slice/rspec',
134 # Security capability to empower a slice to make an authenticated API call, set by silverauth NM plugin.
136 'description': "Sliver authorization key.",
137 'category' : 'slice/auth',
140 # Capability to give a sliver access to unused raw disk
141 {'tagname': "rawdisk",
142 'description': "map unused raw disk devices into the slice",
143 'category' : 'slice/access', # we should get rid of this category thing
146 { 'tagname' : 'exempt_slice_until',
147 'description' : 'Exclude this slice from MyOps until given date (YYYYMMDD)',
148 'category' : 'slice/myops',
149 'min_role_id' : 10} ,
151 # DistributedRateLimiting slice
153 'description': "Is a default Distributed Rate Limiting slice (1) or not (0 or unset)",
154 'category' : 'slice/general',
157 # OMF controlled slice
159 'description': "Enable OMF (cOntrol and Management Framework) for the slice",
160 'category' : 'slice/general',
164 # add in the platform supported rlimits to the default_attribute_types
165 for entry in resource.__dict__.keys() + ["VLIMIT_OPENFD"]:
166 if entry.find("LIMIT_")==1:
167 rlim = entry[len("RLIMIT_"):]
169 for ty in ("min","soft","hard"):
171 'tagname': "%s_%s"%(rlim,ty),
172 'description': "Per sliver RLIMIT %s_%s."%(rlim,ty),
173 'category': 'slice/limit',
174 'min_role_id': 10 #admin
176 slicetag_types.append(attribute)
178 for slicetag_type in slicetag_types:
179 SetTagType(slicetag_type)