Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 1 | option app_label = "core"; |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 2 | |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 3 | message XOSBase { |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 4 | option skip_init = True; |
Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 5 | |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 6 | 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 Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 10 | optional string backend_register = 5 [default = "{}", max_length = 1024]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 11 | required bool backend_need_delete = 6 [default = False]; |
| 12 | required bool backend_need_reap = 7 [default = False]; |
Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 13 | required string backend_status = 8 [default = "0 - Provisioning in progress", max_length = 1024, null = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 14 | 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 Baker | 2c465a6 | 2017-06-09 14:21:11 -0700 | [diff] [blame] | 19 | optional string policy_status = 14 [default = "0 - Policy in process", max_length = 1024]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 20 | } |
| 21 | |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 22 | message User (AbstractBaseUser,PlModelMixIn) { |
| 23 | option skip_django = True; |
Matteo Scandolo | 3b7857b | 2017-06-30 16:22:33 -0700 | [diff] [blame] | 24 | option tosca_description = "An XOS User"; |
Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 25 | |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 26 | 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 Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 28 | required string password = 3 [default = "Something", max_length = 255, blank = False, null = False, db_index = False]; |
Sapan Bhatia | afce8fd | 2017-06-28 23:24:53 -0700 | [diff] [blame] | 29 | 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 Baker | e08d006 | 2017-07-11 12:04:26 -0700 | [diff] [blame] | 57 | optional string policy_status = 32 [default = "0 - Policy in process", max_length = 1024]; |
| 58 | } |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 59 | |
Sapan Bhatia | 8918ac3 | 2017-07-09 00:43:27 -0400 | [diff] [blame] | 60 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 70 | message AddressPool (XOSBase) { |
| 71 | required string name = 1 [db_index = False, max_length = 32, null = False, blank = False]; |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 72 | optional string addresses = 2 [db_index = False, null = True, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 73 | 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 76 | optional string inuse = 6 [db_index = False, null = True, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 77 | optional manytoone service->Service:addresspools = 7 [db_index = True, null = True, blank = True]; |
| 78 | } |
| 79 | |
| 80 | |
| 81 | message 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 | |
| 97 | message 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 Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 100 | required bool enabled = 3 [default = True, db_index = False, blank = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 101 | 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 | |
| 105 | message ControllerImages (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 106 | required manytoone image->Image:controllerimages = 1 [db_index = True, null = False, blank = False, unique_with = "controller"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 107 | 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 | |
| 112 | message ControllerNetwork (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 113 | required manytoone network->Network:controllernetworks = 1 [db_index = True, null = False, blank = False, unique_with = "controller"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 114 | 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 | |
| 126 | message 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 | |
| 131 | message ControllerSite (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 132 | required manytoone site->Site:controllersite = 1 [db_index = True, null = False, blank = False, unique_with="controller"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 133 | 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 Bhatia | 8918ac3 | 2017-07-09 00:43:27 -0400 | [diff] [blame] | 137 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 142 | |
| 143 | message ControllerSitePrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 144 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 146 | 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 | |
| 150 | message ControllerSlice (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 151 | required manytoone controller->Controller:controllerslices = 1 [db_index = True, null = False, blank = False, unique_with = "slice"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 152 | 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 | |
| 157 | message ControllerSlicePrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 158 | required manytoone controller->Controller:controllersliceprivileges = 1 [db_index = True, null = False, blank = False, unique_with = "slice_privilege"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 159 | 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 | |
| 164 | message ControllerUser (XOSBase) { |
| 165 | required manytoone user->User:controllerusers = 1 [db_index = True, null = False, blank = False]; |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 166 | required manytoone controller->Controller:controllersusers = 2 [db_index = True, null = False, blank = False, unique_with = "user"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 167 | 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 | |
| 171 | message 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 Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 174 | required bool enabled = 3 [default = True, db_index = False, blank = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 175 | 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 | |
| 182 | message 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 184 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | |
| 188 | message DeploymentPrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 189 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 191 | required manytoone role->DeploymentRole:deploymentprivileges = 3 [db_index = True, null = False, blank = False]; |
| 192 | } |
| 193 | |
| 194 | |
| 195 | message 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 | |
| 200 | message 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 | |
| 205 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 209 | } |
| 210 | |
| 211 | |
| 212 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | |
| 222 | message ImageDeployments (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 223 | required manytoone image->Image:imagedeployments = 1 [db_index = True, null = False, blank = False, unique_with = "deployment"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 224 | required manytoone deployment->Deployment:imagedeployments = 2 [db_index = True, null = False, blank = False]; |
| 225 | } |
| 226 | |
| 227 | |
| 228 | message 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 241 | optional string userData = 13 [help_text = "user_data passed to instance during creation", null = True, db_index = False, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 242 | 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 | } |
| 246 | message 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 | |
| 263 | message 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 | |
| 271 | message 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 | |
| 277 | message NetworkSlice (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 278 | required manytoone network->Network:networkslices = 1 [db_index = True, null = False, blank = False, unique_with = "slice"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 279 | required manytoone slice->Slice:networkslices = 2 [db_index = True, null = False, blank = False]; |
| 280 | } |
| 281 | message 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 | } |
| 293 | message 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 | } |
| 297 | message 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 | } |
| 301 | message Port (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 302 | required manytoone network->Network:links = 1 [db_index = True, null = False, blank = False, unique_with = "instance"]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 303 | 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 | |
| 311 | message 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 | |
| 318 | message Service (XOSBase,AttributeMixin) { |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 319 | optional string description = 1 [help_text = "Description of Service", max_length = 254, null = True, db_index = False, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 320 | 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 327 | optional string public_key = 9 [help_text = "Public key string", max_length = 4096, null = True, db_index = False, blank = True, varchar = True]; |
Zack Williams | f517e40 | 2017-05-20 13:37:43 -0700 | [diff] [blame] | 328 | optional string private_key_fn = 10 [db_index = False, max_length = 4096, null = True, content_type = "stripped", blank = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 329 | optional string service_specific_id = 11 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True]; |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 330 | optional string service_specific_attribute = 12 [db_index = False, null = True, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 331 | } |
| 332 | |
| 333 | |
| 334 | message ServiceAttribute (XOSBase) { |
| 335 | required string name = 1 [help_text = "Attribute Name", max_length = 128, null = False, db_index = False, blank = False]; |
Sapan Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 336 | required string value = 2 [help_text = "Attribute Value", null = False, db_index = False, blank = False, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 337 | 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 Baker | 071da96 | 2017-07-13 10:43:41 -0700 | [diff] [blame^] | 341 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | |
| 348 | message 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 351 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | |
| 355 | message ServicePrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 356 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 358 | required manytoone role->ServiceRole:serviceprivileges = 3 [db_index = True, null = False, blank = False]; |
| 359 | } |
| 360 | |
| 361 | |
| 362 | message 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 | |
| 367 | message 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 | |
| 382 | message SiteDeployment (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 383 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 385 | 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 | |
| 390 | message 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 | |
| 397 | message 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 Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 400 | |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 401 | message Slice (XOSBase) { |
Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 402 | option plural = "Slices"; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 403 | 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 405 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 406 | 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 | |
| 421 | message SlicePrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 422 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 424 | required manytoone role->SliceRole:sliceprivileges = 3 [db_index = True, null = False, blank = False]; |
| 425 | } |
| 426 | |
| 427 | |
| 428 | message 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 | |
| 433 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 441 | message 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 451 | optional string service_specific_attribute = 10 [db_index = False, null = True, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 452 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 455 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 461 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 467 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 471 | message 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 Bhatia | d022aeb | 2017-06-07 15:49:55 +0200 | [diff] [blame] | 474 | optional string service_specific_attribute = 3 [db_index = False, null = True, blank = True, varchar = True]; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 475 | optional string service_specific_id = 4 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True]; |
| 476 | } |
| 477 | |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 478 | message TenantRootPrivilege (XOSBase) { |
Sapan Bhatia | f7934b5 | 2017-06-12 05:04:23 -0700 | [diff] [blame] | 479 | 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 481 | required manytoone role->TenantRootRole:tenant_root_privileges = 3 [db_index = True, null = False, blank = False]; |
| 482 | } |
| 483 | |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 484 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 488 | message 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 Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 495 | message XOS (XOSBase) { |
Sapan Bhatia | cb35e7f | 2017-05-24 12:17:28 +0200 | [diff] [blame] | 496 | option singular="XOS"; |
| 497 | option plural="XOSes"; |
Sapan Bhatia | 170ae27 | 2017-05-30 19:01:09 +0200 | [diff] [blame] | 498 | 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 | |
| 501 | message 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 | } |