Added xproto files to vTR
Change-Id: I387b2e2ae13b1b2a855da8c9bbf08a116b221183
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..abff5f4
--- /dev/null
+++ b/README.md
@@ -0,0 +1,11 @@
+# Virtual Truckroll Service
+
+The `vTR` service is designed to perform a connectivity test in place of the subscriber. It will save you time and costs of sending a truck to the subscriber premises to perform the same kind of test.
+
+## Onboarding
+
+To onboard this service in your system, you can execute the `onboard-vtr.yaml` playbook, using this command:
+
+```
+ansible-playbook -i /etc/maas/ansible/pod-inventory --extra-vars=@/opt/cord/build/genconfig/config.yml onboard-vtr-playbook.yaml
+```
diff --git a/xos/models/vtrservice.xproto b/xos/models/vtrservice.xproto
new file mode 100644
index 0000000..a8e4c3c
--- /dev/null
+++ b/xos/models/vtrservice.xproto
@@ -0,0 +1,15 @@
+message VTRService {
+ optional string description = 1 [help_text = "Description of Service", max_length = 254, null = True, db_index = False, blank = True];
+ required bool enabled = 2 [default = True, null = False, db_index = False, blank = True];
+ required string kind = 3 [default = "generic", max_length = 30, content_type = "stripped", blank = False, help_text = "Kind of service", null = False, db_index = False];
+ required string name = 4 [max_length = 30, content_type = "stripped", blank = False, help_text = "Service Name", null = False, db_index = False];
+ optional string versionNumber = 5 [max_length = 30, content_type = "stripped", blank = True, help_text = "Version of Service Definition", null = True, db_index = False];
+ required bool published = 6 [default = True, null = False, db_index = False, blank = True];
+ optional string view_url = 7 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
+ optional string icon_url = 8 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
+ optional string public_key = 9 [help_text = "Public key string", max_length = 1024, null = True, db_index = False, blank = True];
+ optional string private_key_fn = 10 [db_index = False, max_length = 1024, null = True, content_type = "stripped", blank = True];
+ optional string service_specific_id = 11 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True];
+ optional string service_specific_attribute = 12 [db_index = False, null = True, blank = True];
+ optional manytoone controller->ServiceController:services = 13 [help_text = "The Service Controller this Service uses", null = True, db_index = True, blank = True];
+}
diff --git a/xos/models/vtrtenant.xproto b/xos/models/vtrtenant.xproto
new file mode 100644
index 0000000..d1e2a3e
--- /dev/null
+++ b/xos/models/vtrtenant.xproto
@@ -0,0 +1,20 @@
+message VTRTenant {
+ optional string name = 1 [db_index = False, max_length = 200, null = True, content_type = "stripped", blank = True];
+ required string kind = 2 [default = "generic", max_length = 30, content_type = "stripped", blank = False, null = False, db_index = False];
+ required manytoone provider_service->Service:provided_tenants = 3 [db_index = True, null = False, blank = False];
+ optional manytoone subscriber_service->Service:subscribed_tenants = 4 [db_index = True, null = True, blank = True];
+ optional manytoone subscriber_tenant->Tenant:subscribed_tenants = 5 [db_index = True, null = True, blank = True];
+ optional manytoone subscriber_user->User:subscribed_tenants = 6 [db_index = True, null = True, blank = True];
+ optional manytoone subscriber_root->TenantRoot:subscribed_tenants = 7 [db_index = True, null = True, blank = True];
+ optional manytoone subscriber_network->Network:subscribed_tenants = 8 [db_index = True, null = True, blank = True];
+ optional string service_specific_id = 9 [db_index = False, max_length = 30, null = True, content_type = "stripped", blank = True];
+ optional string service_specific_attribute = 10 [db_index = False, null = True, blank = True];
+ 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];
+ required string test = 12 [choices = "(('ping', 'Ping'), ('traceroute', 'Trace Route'), ('tcpdump', 'Tcp Dump'))", max_length = 30, content_type = "stripped", blank = False, help_text = "type of test", null = False, db_index = False];
+ required string scope = 13 [choices = "(('container', 'Container'), ('vm', 'VM'))", max_length = 30, content_type = "stripped", blank = False, help_text = "scope of test", null = False, db_index = False];
+ optional string argument = 14 [db_index = False, max_length = 40, null = True, content_type = "stripped", blank = True];
+ optional string result = 15 [db_index = False, null = True, blank = True];
+ optional string result_code = 16 [db_index = False, max_length = 32, null = True, content_type = "stripped", blank = True];
+ required manytoone target_type->ContentType:vtrtenant = 17 [db_index = True, null = False, blank = False];
+ required uint32 target_id = 18 [db_index = False, null = False, blank = False];
+}