blob: 1a77eee5f5c7af959e971b88b169658add22a39a [file] [log] [blame]
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +02001option app_label = "core";
Sapan Bhatiad022aeb2017-06-07 15:49:55 +02002
Sapan Bhatia170ae272017-05-30 19:01:09 +02003message XOSBase {
Sapan Bhatiad022aeb2017-06-07 15:49:55 +02004 option skip_init = True;
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +02005
Sapan Bhatia170ae272017-05-30 19:01:09 +02006 required string created = 1 [content_type = "date", auto_now_add = True];
7 required string updated = 2 [default = "now()", content_type = "date"];
8 optional string enacted = 3 [null = True, content_type = "date", blank = True, default = None];
9 optional string policed = 4 [null = True, content_type = "date", blank = True, default = None];
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +020010 optional string backend_register = 5 [default = "{}", max_length = 1024];
Sapan Bhatia170ae272017-05-30 19:01:09 +020011 required bool backend_need_delete = 6 [default = False];
12 required bool backend_need_reap = 7 [default = False];
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +020013 required string backend_status = 8 [default = "0 - Provisioning in progress", max_length = 1024, null = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +020014 required bool deleted = 9 [default = False];
15 required bool write_protect = 10 [default = False];
16 required bool lazy_blocked = 11 [default = False];
17 required bool no_sync = 12 [default = False];
18 required bool no_policy = 13 [default = False];
Scott Baker2c465a62017-06-09 14:21:11 -070019 optional string policy_status = 14 [default = "0 - Policy in process", max_length = 1024];
Sapan Bhatia170ae272017-05-30 19:01:09 +020020}
21
Sapan Bhatiad022aeb2017-06-07 15:49:55 +020022message User (AbstractBaseUser,PlModelMixIn) {
23 option skip_django = True;
Matteo Scandolo3b7857b2017-06-30 16:22:33 -070024 option tosca_description = "An XOS User";
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +020025
Sapan Bhatiad022aeb2017-06-07 15:49:55 +020026 required string email = 1 [db_index = True, max_length = 255, null = False, blank = False];
27 required string username = 2 [default = "Something", max_length = 255, content_type = "stripped", blank = False, null = False, db_index = False];
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +020028 required string password = 3 [default = "Something", max_length = 255, blank = False, null = False, db_index = False];
Sapan Bhatiaafce8fd2017-06-28 23:24:53 -070029 optional string last_login = 4 [db_index = False, null = True, content_type = "date", blank = True];
30 required string firstname = 5 [max_length = 200, content_type = "stripped", blank = False, help_text = "person's given name", null = False, db_index = False];
31 required string lastname = 6 [max_length = 200, content_type = "stripped", blank = False, help_text = "person's surname", null = False, db_index = False];
32 optional string phone = 7 [max_length = 100, content_type = "stripped", blank = True, help_text = "phone number contact", null = True, db_index = False];
33 optional string user_url = 8 [db_index = False, max_length = 200, null = True, content_type = "url", blank = True];
34 required manytoone site->Site:users = 9 [help_text = "Site this user will be homed too", null = False, db_index = True, blank = False];
35 optional string public_key = 10 [help_text = "Public key string", max_length = 1024, null = True, db_index = False, blank = True, varchar = True];
36 required bool is_active = 11 [default = True, null = False, db_index = False, blank = True];
37 required bool is_admin = 12 [default = False, null = False, db_index = False, blank = True];
38 required bool is_staff = 13 [default = True, null = False, db_index = False, blank = True];
39 required bool is_readonly = 14 [default = False, null = False, db_index = False, blank = True];
40 required bool is_registering = 15 [default = False, null = False, db_index = False, blank = True];
41 required bool is_appuser = 16 [default = False, null = False, db_index = False, blank = True];
42 optional string login_page = 17 [max_length = 200, content_type = "stripped", blank = True, help_text = "send this user to a specific page on login", null = True, db_index = False];
43 required string created = 18 [db_index = False, null = False, content_type = "date", blank = True];
44 required string updated = 19 [db_index = False, null = False, content_type = "date", blank = True];
45 optional string enacted = 20 [db_index = False, null = True, content_type = "date", blank = False];
46 optional string policed = 21 [db_index = False, null = True, content_type = "date", blank = False];
47 required string backend_status = 22 [default = "Provisioning in progress", max_length = 1024, content_type = "stripped", blank = False, null = False, db_index = False];
48 required bool backend_need_delete = 23 [default = False, null = False, db_index = False, blank = True];
49 required bool backend_need_reap = 24 [default = False, null = False, db_index = False, blank = True];
50 required bool deleted = 25 [default = False, null = False, db_index = False, blank = True];
51 required bool write_protect = 26 [default = False, null = False, db_index = False, blank = True];
52 required bool lazy_blocked = 27 [default = False, null = False, db_index = False, blank = True];
53 required bool no_sync = 28 [default = False, null = False, db_index = False, blank = True];
54 required bool no_policy = 29 [default = False, null = False, db_index = False, blank = True];
55 required string timezone = 30 [default = "America/New_York", max_length = 100, blank = False, null = False, db_index = False];
56 required manytomany dashboards->DashboardView/UserDashboardView:user = 31 [db_index = False, null = False, blank = True];
Scott Bakere08d0062017-07-11 12:04:26 -070057 optional string policy_status = 32 [default = "0 - Policy in process", max_length = 1024];
58}
Sapan Bhatiad022aeb2017-06-07 15:49:55 +020059
Sapan Bhatia8918ac32017-07-09 00:43:27 -040060message Privilege (XOSBase) {
61 required int32 accessor_id = 1 [null = False];
62 required string accessor_type = 2 [null = False, max_length=1024];
63 required int32 object_id = 3 [null = False];
64 required string object_type = 4 [null = False, max_length=1024];
65 required string permission = 5 [null = False, default = "all", max_length=1024];
66 required string granted = 6 [content_type = "date", auto_now_add = True, max_length=1024];
67 required string expires = 7 [content_type = "date", null = True, max_length=1024];
68}
69
Sapan Bhatia170ae272017-05-30 19:01:09 +020070message AddressPool (XOSBase) {
71 required string name = 1 [db_index = False, max_length = 32, null = False, blank = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +020072 optional string addresses = 2 [db_index = False, null = True, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +020073 optional string gateway_ip = 3 [db_index = False, max_length = 32, null = True, blank = False];
74 optional string gateway_mac = 4 [db_index = False, max_length = 32, null = True, blank = False];
75 optional string cidr = 5 [db_index = False, max_length = 32, null = True, blank = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +020076 optional string inuse = 6 [db_index = False, null = True, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +020077 optional manytoone service->Service:addresspools = 7 [db_index = True, null = True, blank = True];
78}
79
80
81message Controller (XOSBase) {
82 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the Controller", null = False, db_index = False];
83 required string backend_type = 2 [max_length = 200, content_type = "stripped", blank = False, help_text = "Type of compute controller, e.g. EC2, OpenStack, or OpenStack version", null = False, db_index = False];
84 required string version = 3 [max_length = 200, content_type = "stripped", blank = False, help_text = "Controller version", null = False, db_index = False];
85 optional string auth_url = 4 [max_length = 200, content_type = "stripped", blank = True, help_text = "Auth url for the compute controller", null = True, db_index = False];
86 optional string admin_user = 5 [max_length = 200, content_type = "stripped", blank = True, help_text = "Username of an admin user at this controller", null = True, db_index = False];
87 optional string admin_password = 6 [max_length = 200, content_type = "stripped", blank = True, help_text = "Password of theadmin user at this controller", null = True, db_index = False];
88 optional string admin_tenant = 7 [max_length = 200, content_type = "stripped", blank = True, help_text = "Name of the tenant the admin user belongs to", null = True, db_index = False];
89 optional string domain = 8 [max_length = 200, content_type = "stripped", blank = True, help_text = "Name of the domain this controller belongs to", null = True, db_index = False];
90 optional string rabbit_host = 9 [max_length = 200, content_type = "stripped", blank = True, help_text = "IP address of rabbitmq server at this controller", null = True, db_index = False];
91 optional string rabbit_user = 10 [max_length = 200, content_type = "stripped", blank = True, help_text = "Username of rabbitmq server at this controller", null = True, db_index = False];
92 optional string rabbit_password = 11 [max_length = 200, content_type = "stripped", blank = True, help_text = "Password of rabbitmq server at this controller", null = True, db_index = False];
93 required manytoone deployment->Deployment:controllerdeployments = 12 [db_index = True, null = False, blank = False];
94}
95
96
97message ControllerDashboardView (XOSBase) {
98 required manytoone controller->Controller:controllerdashboardviews = 1 [db_index = True, null = False, blank = False];
99 required manytoone dashboardView->DashboardView:controllerdashboardviews = 2 [db_index = True, null = False, blank = False];
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +0200100 required bool enabled = 3 [default = True, db_index = False, blank = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200101 required string url = 4 [max_length = 1024, content_type = "stripped", blank = False, help_text = "URL of Dashboard", null = False, db_index = False];
102}
103
104
105message ControllerImages (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700106 required manytoone image->Image:controllerimages = 1 [db_index = True, null = False, blank = False, unique_with = "controller"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200107 required manytoone controller->Controller:controllerimages = 2 [db_index = True, null = False, blank = False];
108 optional string glance_image_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Glance image id", null = True, db_index = False];
109}
110
111
112message ControllerNetwork (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700113 required manytoone network->Network:controllernetworks = 1 [db_index = True, null = False, blank = False, unique_with = "controller"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200114 required manytoone controller->Controller:controllernetworks = 2 [db_index = True, null = False, blank = False];
115 required string subnet = 3 [db_index = False, max_length = 32, null = False, blank = True];
116 required string start_ip = 4 [db_index = False, max_length = 32, null = False, blank = True];
117 required string stop_ip = 5 [db_index = False, max_length = 32, null = False, blank = True];
118 optional string net_id = 6 [help_text = "Neutron network", max_length = 256, null = True, db_index = False, blank = True];
119 optional string router_id = 7 [help_text = "Neutron router id", max_length = 256, null = True, db_index = False, blank = True];
120 optional string subnet_id = 8 [help_text = "Neutron subnet id", max_length = 256, null = True, db_index = False, blank = True];
121 optional string gateway = 9 [db_index = False, max_length = 32, null = True, blank = True];
122 optional string segmentation_id = 10 [db_index = False, max_length = 32, null = True, blank = True];
123}
124
125
126message ControllerRole (XOSBase) {
127 required string role = 1 [choices = "(('admin', 'Admin'),)", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
128}
129
130
131message ControllerSite (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700132 required manytoone site->Site:controllersite = 1 [db_index = True, null = False, blank = False, unique_with="controller"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200133 optional manytoone controller->Controller:controllersite = 2 [db_index = True, null = True, blank = True];
134 optional string tenant_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone tenant id", null = True, db_index = True];
135}
136
Sapan Bhatia8918ac32017-07-09 00:43:27 -0400137message ControllerPrivilege (XOSBase) {
138 required manytoone controller->Controller:controllerprivileges = 1 [db_index = True, null = False, blank = False];
139 required manytoone privilege->Privilege:controllerprivileges = 2 [db_index = True, null = False, blank = False];
140 optional string role_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone id", null = True, db_index = True];
141}
Sapan Bhatia170ae272017-05-30 19:01:09 +0200142
143message ControllerSitePrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700144 required manytoone controller->Controller:controllersiteprivileges = 1 [db_index = True, null = False, blank = False, unique_with = "site_privilege"];
145 required manytoone site_privilege->SitePrivilege:controllersiteprivileges = 2 [db_index = True, null = False, blank = False, unique_with = "role_id"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200146 optional string role_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone id", null = True, db_index = True];
147}
148
149
150message ControllerSlice (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700151 required manytoone controller->Controller:controllerslices = 1 [db_index = True, null = False, blank = False, unique_with = "slice"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200152 required manytoone slice->Slice:controllerslices = 2 [db_index = True, null = False, blank = False];
153 optional string tenant_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone tenant id", null = True, db_index = False];
154}
155
156
157message ControllerSlicePrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700158 required manytoone controller->Controller:controllersliceprivileges = 1 [db_index = True, null = False, blank = False, unique_with = "slice_privilege"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200159 required manytoone slice_privilege->SlicePrivilege:controllersliceprivileges = 2 [db_index = True, null = False, blank = False];
160 optional string role_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone id", null = True, db_index = True];
161}
162
163
164message ControllerUser (XOSBase) {
165 required manytoone user->User:controllerusers = 1 [db_index = True, null = False, blank = False];
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700166 required manytoone controller->Controller:controllersusers = 2 [db_index = True, null = False, blank = False, unique_with = "user"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200167 optional string kuser_id = 3 [max_length = 200, content_type = "stripped", blank = True, help_text = "Keystone user id", null = True, db_index = False];
168}
169
170
171message DashboardView (XOSBase) {
172 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the View", null = False, db_index = False];
173 required string url = 2 [max_length = 1024, content_type = "stripped", blank = False, help_text = "URL of Dashboard", null = False, db_index = False];
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +0200174 required bool enabled = 3 [default = True, db_index = False, blank = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200175 required string icon = 4 [default = "default-icon.png", max_length = 200, blank = False, help_text = "Icon for Dashboard", null = False, db_index = False];
176 required string icon_active = 5 [default = "default-icon-active.png", max_length = 200, blank = False, help_text = "Icon for active Dashboard", null = False, db_index = False];
177 required manytomany controllers->Controller/ControllerDashboardView:dashboardviews = 6 [db_index = False, null = False, blank = True];
178 required manytomany deployments->Deployment/DashboardView_deployments:dashboardviews = 7 [help_text = "Deployments that should be included in this view", null = False, db_index = False, blank = True];
179}
180
181
182message Deployment (XOSBase) {
183 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the Deployment", null = False, db_index = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200184 required string accessControl = 2 [default = "allow all", max_length = 200, blank = False, help_text = "Access control list that specifies which sites/users may use nodes in this deployment", null = False, db_index = False, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200185}
186
187
188message DeploymentPrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700189 required manytoone user->User:deploymentprivileges = 1 [db_index = True, null = False, blank = False, unique_with="deployment"];
190 required manytoone deployment->Deployment:deploymentprivileges = 2 [db_index = True, null = False, blank = False, unique_with="role"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200191 required manytoone role->DeploymentRole:deploymentprivileges = 3 [db_index = True, null = False, blank = False];
192}
193
194
195message DeploymentRole (XOSBase) {
196 required string role = 1 [choices = "(('admin', 'Admin'),)", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
197}
198
199
200message Diag (XOSBase) {
201 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the synchronizer", null = False, db_index = False];
202}
203
204
205message Flavor (XOSBase) {
206 required string name = 1 [max_length = 32, content_type = "stripped", blank = False, help_text = "name of this flavor, as displayed to users", null = False, db_index = False];
207 optional string description = 2 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
208 required string flavor = 3 [max_length = 32, content_type = "stripped", blank = False, help_text = "flavor string used to configure deployments", null = False, db_index = False];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200209}
210
211
212message Image (XOSBase) {
213 required string name = 1 [db_index = False, max_length = 256, null = False, content_type = "stripped", blank = False];
214 required string kind = 2 [default = "vm", choices = "(('vm', 'Virtual Machine'), ('container', 'Container'))", max_length = 30, blank = False, null = False, db_index = False];
215 required string disk_format = 3 [db_index = False, max_length = 256, null = False, content_type = "stripped", blank = False];
216 required string container_format = 4 [db_index = False, max_length = 256, null = False, content_type = "stripped", blank = False];
217 optional string path = 5 [max_length = 256, content_type = "stripped", blank = True, help_text = "Path to image on local disk", null = True, db_index = False];
218 optional string tag = 6 [max_length = 256, content_type = "stripped", blank = True, help_text = "For Docker Images, tag of image", null = True, db_index = False];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200219}
220
221
222message ImageDeployments (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700223 required manytoone image->Image:imagedeployments = 1 [db_index = True, null = False, blank = False, unique_with = "deployment"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200224 required manytoone deployment->Deployment:imagedeployments = 2 [db_index = True, null = False, blank = False];
225}
226
227
228message Instance (XOSBase) {
229 optional string instance_id = 1 [max_length = 200, content_type = "stripped", blank = True, help_text = "Nova instance id", null = True, db_index = False];
230 optional string instance_uuid = 2 [max_length = 200, content_type = "stripped", blank = True, help_text = "Nova instance uuid", null = True, db_index = False];
231 required string name = 3 [max_length = 200, content_type = "stripped", blank = False, help_text = "Instance name", null = False, db_index = False];
232 optional string instance_name = 4 [max_length = 200, content_type = "stripped", blank = True, help_text = "OpenStack generated name", null = True, db_index = False];
233 optional string ip = 5 [max_length = 39, content_type = "ip", blank = True, help_text = "Instance ip address", null = True, db_index = False];
234 required manytoone image->Image:instances = 6 [db_index = True, null = False, blank = False];
235 optional manytoone creator->User:instances = 7 [db_index = True, null = True, blank = True];
236 required manytoone slice->Slice:instances = 8 [db_index = True, null = False, blank = False];
237 required manytoone deployment->Deployment:instance_deployment = 9 [db_index = True, null = False, blank = False];
238 required manytoone node->Node:instances = 10 [db_index = True, null = False, blank = False];
239 required int32 numberCores = 11 [help_text = "Number of cores for instance", default = 0, null = False, db_index = False, blank = False];
240 required manytoone flavor->Flavor:instance = 12 [help_text = "Flavor of this instance", null = False, db_index = True, blank = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200241 optional string userData = 13 [help_text = "user_data passed to instance during creation", null = True, db_index = False, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200242 required string isolation = 14 [default = "vm", choices = "(('vm', 'Virtual Machine'), ('container', 'Container'), ('container_vm', 'Container In VM'))", max_length = 30, blank = False, null = False, db_index = False];
243 optional string volumes = 15 [help_text = "Comma-separated list of directories to expose to parent context", null = True, db_index = False, blank = True];
244 optional manytoone parent->Instance:instance = 16 [help_text = "Parent Instance for containers nested inside of VMs", null = True, db_index = True, blank = True];
245}
246message Network (XOSBase) {
247 required string name = 1 [db_index = False, max_length = 32, null = False, blank = False];
248 required manytoone template->NetworkTemplate:network = 2 [db_index = True, null = False, blank = False];
249 required string subnet = 3 [db_index = False, max_length = 32, null = False, blank = True];
250 required string start_ip = 4 [db_index = False, max_length = 32, null = False, blank = True];
251 required string end_ip = 5 [db_index = False, max_length = 32, null = False, blank = True];
252 optional string ports = 6 [db_index = False, max_length = 1024, null = True, blank = True];
253 optional string labels = 7 [db_index = False, max_length = 1024, null = True, blank = True];
254 required manytoone owner->Slice:ownedNetworks = 8 [help_text = "Slice that owns control of this Network", null = False, db_index = True, blank = False];
255 required bool permit_all_slices = 10 [default = False, null = False, db_index = False, blank = True];
256 required bool autoconnect = 17 [help_text = "This network can be autoconnected to the slice that owns it", default = True, null = False, db_index = False, blank = True];
257 required manytomany permitted_slices->Slice/Network_permitted_slices:availableNetworks = 18 [db_index = False, null = False, blank = True];
258 required manytomany slices->Slice/NetworkSlice:networks = 19 [db_index = False, null = False, blank = True];
259 required manytomany instances->Instance/Port:networks = 20 [db_index = False, null = False, blank = True];
260}
261
262
263message NetworkParameter (XOSBase) {
264 required manytoone parameter->NetworkParameterType:networkparameters = 1 [help_text = "The type of the parameter", null = False, db_index = True, blank = False];
265 required string value = 2 [help_text = "The value of this parameter", max_length = 1024, null = False, db_index = False, blank = False];
266 required string content_type = 4 [max_length = 1024, content_type = "stripped", blank = False, help_text = "Content type id linked to this network parameter", null = False, db_index = False];
267 required uint32 object_id = 4 [db_index = False, null = False, blank = False, help_text = "Object linked to this NetworkParameter"];
268}
269
270
271message NetworkParameterType (XOSBase) {
272 required string name = 1 [help_text = "The name of this parameter", max_length = 128, null = False, db_index = True, blank = False];
273 required string description = 2 [db_index = False, max_length = 1024, null = False, blank = False];
274}
275
276
277message NetworkSlice (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700278 required manytoone network->Network:networkslices = 1 [db_index = True, null = False, blank = False, unique_with = "slice"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200279 required manytoone slice->Slice:networkslices = 2 [db_index = True, null = False, blank = False];
280}
281message NetworkTemplate (XOSBase) {
282 required string name = 1 [db_index = False, max_length = 32, null = False, blank = False];
283 optional string description = 2 [db_index = False, max_length = 1024, null = True, blank = True];
284 required string visibility = 4 [default = "private", choices = "(('public', 'public'), ('private', 'private'))", max_length = 30, blank = False, null = False, db_index = False];
285 required string translation = 5 [default = "none", choices = "(('none', 'none'), ('NAT', 'NAT'))", max_length = 30, blank = False, null = False, db_index = False];
286 optional string access = 6 [choices = "((None, 'None'), ('indirect', 'Indirect'), ('direct', 'Direct'))", max_length = 30, blank = True, help_text = "Advertise this network as a means for other slices to contact this slice", null = True, db_index = False];
287 optional string shared_network_name = 7 [db_index = False, max_length = 30, null = True, blank = True];
288 optional string shared_network_id = 8 [help_text = "Quantum network", max_length = 256, null = True, db_index = False, blank = True];
289 required string topology_kind = 9 [default = "bigswitch", choices = "(('bigswitch', 'BigSwitch'), ('physical', 'Physical'), ('custom', 'Custom'))", max_length = 30, blank = False, null = False, db_index = False];
290 optional string controller_kind = 10 [blank = True, max_length = 30, null = True, db_index = False, choices = "((None, 'None'), ('onos', 'ONOS'), ('custom', 'Custom'))"];
291 optional string vtn_kind = 11 [default = "PRIVATE", choices = "(('PRIVATE', 'Private'), ('PUBLIC', 'Public'), ('MANAGEMENT_LOCAL', 'Management Local'), ('MANAGEMENT_HOST', 'Management Host'), ('VSG', 'VSG'), ('ACCESS_AGENT', 'Access Agent'))", max_length = 30, blank = True, null = True, db_index = False];
292}
293message Node (XOSBase) {
294 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the Node", null = False, db_index = False];
295 required manytoone site_deployment->SiteDeployment:nodes = 2 [db_index = True, null = False, blank = False];
296}
297message NodeLabel (XOSBase) {
298 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "label name", null = False, db_index = False];
299 required manytomany node->Node/NodeLabel_node:nodelabels = 2 [db_index = False, null = False, blank = True];
300}
301message Port (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700302 required manytoone network->Network:links = 1 [db_index = True, null = False, blank = False, unique_with = "instance"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200303 optional manytoone instance->Instance:ports = 2 [db_index = True, null = True, blank = True];
304 optional string ip = 3 [max_length = 39, content_type = "ip", blank = True, help_text = "Instance ip address", null = True, db_index = False];
305 optional string port_id = 4 [help_text = "Neutron port id", max_length = 256, null = True, db_index = False, blank = True];
306 optional string mac = 5 [help_text = "MAC address associated with this port", max_length = 256, null = True, db_index = False, blank = True];
307 required bool xos_created = 6 [default = False, null = False, db_index = False, blank = True];
308}
309
310
311message Role (XOSBase) {
312 required string role_type = 1 [db_index = False, max_length = 80, null = False, content_type = "stripped", blank = False];
313 optional string role = 2 [db_index = False, max_length = 80, null = True, content_type = "stripped", blank = True];
314 required string description = 3 [db_index = False, max_length = 120, null = False, content_type = "stripped", blank = False];
315}
316
317
318message Service (XOSBase,AttributeMixin) {
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200319 optional string description = 1 [help_text = "Description of Service", max_length = 254, null = True, db_index = False, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200320 required bool enabled = 2 [default = True, null = False, db_index = False, blank = True];
321 required string kind = 3 [default = "generic", max_length = 30, content_type = "stripped", blank = False, help_text = "Kind of service", null = False, db_index = False];
322 required string name = 4 [max_length = 30, content_type = "stripped", blank = False, help_text = "Service Name", null = False, db_index = False];
323 optional string versionNumber = 5 [max_length = 30, content_type = "stripped", blank = True, help_text = "Version of Service Definition", null = True, db_index = False];
324 required bool published = 6 [default = True, null = False, db_index = False, blank = True];
325 optional string view_url = 7 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
326 optional string icon_url = 8 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200327 optional string public_key = 9 [help_text = "Public key string", max_length = 4096, null = True, db_index = False, blank = True, varchar = True];
Zack Williamsf517e402017-05-20 13:37:43 -0700328 optional string private_key_fn = 10 [db_index = False, max_length = 4096, null = True, content_type = "stripped", blank = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200329 optional string service_specific_id = 11 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200330 optional string service_specific_attribute = 12 [db_index = False, null = True, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200331}
332
333
334message ServiceAttribute (XOSBase) {
335 required string name = 1 [help_text = "Attribute Name", max_length = 128, null = False, db_index = False, blank = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200336 required string value = 2 [help_text = "Attribute Value", null = False, db_index = False, blank = False, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200337 required manytoone service->Service:serviceattributes = 3 [help_text = "The Service this attribute is associated with", null = False, db_index = True, blank = False];
338}
339
340
Scott Baker071da962017-07-13 10:43:41 -0700341message ServiceDependency (XOSBase) {
342 required manytoone provider_service->Service:providedDependencies = 1 [help_text = "The service that provides this dependency", null=False, db_index = True, blank=False];
343 required manytoone subscriber_service->Service:subscribedDependencies = 2 [help_text = "The services that subscribes to this dependency", null=False, db_index=True, blank=False];
344 required string connect_method = 3 [max_length = 30, help_text = "method to connect the two services", null=False, blank=False, default="none", choices = "(('none', 'None'), ('private', 'Private'), ('public', 'Public'))"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200345}
346
347
348message ServiceMonitoringAgentInfo (XOSBase) {
349 required string name = 1 [help_text = "Monitoring Agent Name", max_length = 128, null = False, db_index = False, blank = False];
350 optional manytoone service->Service:servicemonitoringagents = 2 [help_text = "The Service this attribute is associated with", null = True, db_index = True, blank = True];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200351 required string target_uri = 3 [help_text = "Monitoring collector URI to be used by agents to publish the data", null = False, db_index = False, blank = False, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200352}
353
354
355message ServicePrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700356 required manytoone user->User:serviceprivileges = 1 [db_index = True, null = False, blank = False, unique_with = "service"];
357 required manytoone service->Service:serviceprivileges = 2 [db_index = True, null = False, blank = False, unique_with = "role"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200358 required manytoone role->ServiceRole:serviceprivileges = 3 [db_index = True, null = False, blank = False];
359}
360
361
362message ServiceRole (XOSBase) {
363 required string role = 1 [choices = "(('admin', 'Admin'),)", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
364}
365
366
367message Site (XOSBase) {
368 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name for this Site", null = False, db_index = False];
369 optional string site_url = 2 [max_length = 512, content_type = "url", blank = True, help_text = "Site's Home URL Page", null = True, db_index = False];
370 required bool enabled = 3 [help_text = "Status for this Site", default = True, null = False, db_index = False, blank = True];
371 required bool hosts_nodes = 4 [help_text = "Indicates whether or not the site host nodes", default = True, null = False, db_index = False, blank = True];
372 required bool hosts_users = 5 [help_text = "Indicates whether or not the site manages user accounts", default = True, null = False, db_index = False, blank = True];
373 optional float longitude = 6 [db_index = False, null = True, blank = True];
374 optional float latitude = 7 [db_index = False, null = True, blank = True];
375 required string login_base = 8 [max_length = 50, content_type = "stripped", blank = False, help_text = "Prefix for Slices associated with this Site", null = False, db_index = False];
376 required bool is_public = 9 [help_text = "Indicates the visibility of this site to other members", default = True, null = False, db_index = False, blank = True];
377 required string abbreviated_name = 10 [db_index = False, max_length = 80, null = False, content_type = "stripped", blank = False];
378 required manytomany deployments->Deployment/SiteDeployment:sites = 11 [help_text = "Select which sites are allowed to host nodes in this deployment", null = False, db_index = False, blank = True];
379}
380
381
382message SiteDeployment (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700383 required manytoone site->Site:sitedeployments = 1 [db_index = True, null = False, blank = False, unique_with = "deployment"];
384 required manytoone deployment->Deployment:sitedeployments = 2 [db_index = True, null = False, blank = False, unique_with = "controller"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200385 optional manytoone controller->Controller:sitedeployments = 3 [db_index = True, null = True, blank = True];
386 optional string availability_zone = 4 [max_length = 200, content_type = "stripped", blank = True, help_text = "OpenStack availability zone", null = True, db_index = False];
387}
388
389
390message SitePrivilege (XOSBase) {
391 required manytoone user->User:siteprivileges = 1 [db_index = True, null = False, blank = False];
392 required manytoone site->Site:siteprivileges = 2 [db_index = True, null = False, blank = False];
393 required manytoone role->SiteRole:siteprivileges = 3 [db_index = True, null = False, blank = False];
394}
395
396
397message SiteRole (XOSBase) {
398 required string role = 1 [choices = "(('admin', 'Admin'), ('pi', 'PI'), ('tech', 'Tech'), ('billing', 'Billing'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
399}
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +0200400
Sapan Bhatia170ae272017-05-30 19:01:09 +0200401message Slice (XOSBase) {
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +0200402 option plural = "Slices";
Sapan Bhatia170ae272017-05-30 19:01:09 +0200403 required string name = 1 [max_length = 80, content_type = "stripped", blank = False, help_text = "The Name of the Slice", null = False, db_index = False];
404 required bool enabled = 2 [help_text = "Status for this Slice", default = True, null = False, db_index = False, blank = True];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200405 required string description = 4 [help_text = "High level description of the slice and expected activities", max_length = 1024, null = False, db_index = False, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200406 required string slice_url = 5 [db_index = False, max_length = 512, null = False, content_type = "url", blank = True];
407 required manytoone site->Site:slices = 6 [help_text = "The Site this Slice belongs to", null = False, db_index = True, blank = False];
408 required int32 max_instances = 7 [default = 10, null = False, db_index = False, blank = False];
409 optional manytoone service->Service:slices = 8 [db_index = True, null = True, blank = True];
410 optional string network = 9 [blank = True, max_length = 256, null = True, db_index = False, choices = "((None, 'Default'), ('host', 'Host'), ('bridged', 'Bridged'), ('noauto', 'No Automatic Networks'))"];
411 optional string exposed_ports = 10 [db_index = False, max_length = 256, null = True, blank = True];
412 optional manytoone creator->User:slices = 12 [db_index = True, null = True, blank = True];
413 optional manytoone default_flavor->Flavor:slices = 13 [db_index = True, null = True, blank = True];
414 optional manytoone default_image->Image:slices = 14 [db_index = True, null = True, blank = True];
415 optional manytoone default_node->Node:slices = 15 [db_index = True, null = True, blank = True];
416 optional string mount_data_sets = 16 [default = "GenBank", max_length = 256, content_type = "stripped", blank = True, null = True, db_index = False];
417 required string default_isolation = 17 [default = "vm", choices = "(('vm', 'Virtual Machine'), ('container', 'Container'), ('container_vm', 'Container In VM'))", max_length = 30, blank = False, null = False, db_index = False];
418}
419
420
421message SlicePrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700422 required manytoone user->User:sliceprivileges = 1 [db_index = True, null = False, blank = False, unique_with = "slice"];
423 required manytoone slice->Slice:sliceprivileges = 2 [db_index = True, null = False, blank = False, unique_with = "role"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200424 required manytoone role->SliceRole:sliceprivileges = 3 [db_index = True, null = False, blank = False];
425}
426
427
428message SliceRole (XOSBase) {
429 required string role = 1 [choices = "(('admin', 'Admin'), ('default', 'Default'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
430}
431
432
433message Tag (XOSBase) {
434 required manytoone service->Service:tags = 1 [help_text = "The Service this Tag is associated with", null = False, db_index = True, blank = False];
435 required string name = 2 [help_text = "The name of this tag", max_length = 128, null = False, db_index = True, blank = False];
436 required string value = 3 [max_length = 1024, content_type = "stripped", blank = False, help_text = "The value of this tag", null = False, db_index = False];
437 required string content_type = 4 [max_length = 1024, content_type = "stripped", blank = False, help_text = "Content type id linked to this tag", null = False, db_index = False];
438 required uint32 object_id = 5 [db_index = False, null = False, blank = False, help_text = "Object linked to this tag"];
439}
440
Sapan Bhatia170ae272017-05-30 19:01:09 +0200441message Tenant (XOSBase,AttributeMixin) {
442 optional string name = 1 [db_index = False, max_length = 200, null = True, content_type = "stripped", blank = True];
443 required string kind = 2 [default = "generic", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
444 required manytoone provider_service->Service:provided_tenants = 3 [db_index = True, null = False, blank = False];
445 optional manytoone subscriber_service->Service:subscribed_tenants = 4 [db_index = True, null = True, blank = True];
446 optional manytoone subscriber_tenant->Tenant:subscribed_tenants = 5 [db_index = True, null = True, blank = True];
447 optional manytoone subscriber_user->User:subscribed_tenants = 6 [db_index = True, null = True, blank = True];
448 optional manytoone subscriber_root->TenantRoot:subscribed_tenants = 7 [db_index = True, null = True, blank = True];
449 optional manytoone subscriber_network->Network:subscribed_tenants = 8 [db_index = True, null = True, blank = True];
450 optional string service_specific_id = 9 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200451 optional string service_specific_attribute = 10 [db_index = False, null = True, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200452 required string connect_method = 11 [default = "na", choices = "(('public', 'Public'), ('private', 'Private'), ('private-unidirectional', 'Private Unidirectional'), ('na', 'Not Applicable'))", max_length = 30, blank = False, null = False, db_index = False];
453}
454
Sapan Bhatia170ae272017-05-30 19:01:09 +0200455message TenantAttribute (XOSBase) {
456 required string name = 1 [help_text = "Attribute Name", max_length = 128, null = False, db_index = False, blank = False];
457 required string value = 2 [help_text = "Attribute Value", null = False, db_index = False, blank = False];
458 required manytoone tenant->Tenant:tenantattributes = 3 [help_text = "The Tenant this attribute is associated with", null = False, db_index = True, blank = False];
459}
460
Sapan Bhatia170ae272017-05-30 19:01:09 +0200461message TenantPrivilege (XOSBase) {
462 required manytoone user->User:tenantprivileges = 1 [db_index = True, null = False, blank = False];
463 required manytoone tenant->Tenant:tenantprivileges = 2 [db_index = True, null = False, blank = False];
464 required manytoone role->TenantRole:tenantprivileges = 3 [db_index = True, null = False, blank = False];
465}
466
Sapan Bhatia170ae272017-05-30 19:01:09 +0200467message TenantRole (XOSBase) {
468 required string role = 1 [choices = "(('admin', 'Admin'), ('access', 'Access'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
469}
470
Sapan Bhatia170ae272017-05-30 19:01:09 +0200471message TenantRoot (XOSBase,AttributeMixin) {
472 required string kind = 1 [default = "generic", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
473 optional string name = 2 [max_length = 255, content_type = "stripped", blank = True, help_text = "name", null = True, db_index = False];
Sapan Bhatiad022aeb2017-06-07 15:49:55 +0200474 optional string service_specific_attribute = 3 [db_index = False, null = True, blank = True, varchar = True];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200475 optional string service_specific_id = 4 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True];
476}
477
Sapan Bhatia170ae272017-05-30 19:01:09 +0200478message TenantRootPrivilege (XOSBase) {
Sapan Bhatiaf7934b52017-06-12 05:04:23 -0700479 required manytoone user->User:tenant_root_privileges = 1 [db_index = True, null = False, blank = False, unique_with = "tenant_root"];
480 required manytoone tenant_root->TenantRoot:tenant_root_privileges = 2 [db_index = True, null = False, blank = False, unique_with = "role"];
Sapan Bhatia170ae272017-05-30 19:01:09 +0200481 required manytoone role->TenantRootRole:tenant_root_privileges = 3 [db_index = True, null = False, blank = False];
482}
483
Sapan Bhatia170ae272017-05-30 19:01:09 +0200484message TenantRootRole (XOSBase) {
485 required string role = 1 [choices = "(('admin', 'Admin'), ('access', 'Access'))", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
486}
487
Sapan Bhatia170ae272017-05-30 19:01:09 +0200488message TenantWithContainer (Tenant) {
489 optional manytoone instance->Instance:+ = 1 [help_text = "Instance used by this Tenant", null = True, db_index = True, blank = True];
490 optional manytoone creator->User:+ = 2 [help_text = "Creator of this Tenant", null = True, db_index = True, blank = True];
491 optional string external_hostname = 3 [max_length = 30, content_type = "stripped", blank = True, help_text = "External host name", null = True, db_index = False];
492 optional string external_container = 4 [max_length = 30, content_type = "stripped", blank = True, help_text = "External host name", null = True, db_index = False];
493}
494
Sapan Bhatia170ae272017-05-30 19:01:09 +0200495message XOS (XOSBase) {
Sapan Bhatiacb35e7f2017-05-24 12:17:28 +0200496 option singular="XOS";
497 option plural="XOSes";
Sapan Bhatia170ae272017-05-30 19:01:09 +0200498 required string name = 1 [default = "XOS", max_length = 200, content_type = "stripped", blank = False, help_text = "Name of XOS", null = False, db_index = False];
499}
500
501message XOSGuiExtension (XOSBase) {
502 required string name = 1 [max_length = 200, content_type = "stripped", blank = False, help_text = "Name of the GUI Extensions", null = False, db_index = False];
503 required string files = 2 [max_length = 1024, content_type = "stripped", blank = False, help_text = "List of comma separated file composing the view", null = False, db_index = False];
504}