CORD-2476 migrate exampleservice to dynamic load
Change-Id: If71abedf21dd83d1b74cb30cb6ba4b9e7ed7ab6d
diff --git a/xos/synchronizer/exampleservice_config.yaml b/xos/synchronizer/exampleservice_config.yaml
index 275a09f..57e1f80 100644
--- a/xos/synchronizer/exampleservice_config.yaml
+++ b/xos/synchronizer/exampleservice_config.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
-name: exampleservice-synchronizer
+name: exampleservice
accessor:
username: xosadmin@opencord.org
password: "@/opt/xos/services/exampleservice/credentials/xosadmin@opencord.org"
@@ -27,3 +27,4 @@
steps_dir: "/opt/xos/synchronizers/exampleservice/steps"
sys_dir: "/opt/xos/synchronizers/exampleservice/sys"
model_policies_dir: "/opt/xos/synchronizers/exampleservice/model_policies"
+models_dir: "/opt/xos/synchronizers/exampleservice/models"
diff --git a/xos/synchronizer/models/exampleservice.xproto b/xos/synchronizer/models/exampleservice.xproto
new file mode 100644
index 0000000..0820c9e
--- /dev/null
+++ b/xos/synchronizer/models/exampleservice.xproto
@@ -0,0 +1,27 @@
+option app_label = "exampleservice";
+option name = "exampleservice";
+
+message ExampleService (Service){
+ option verbose_name = "Example Service";
+ required string service_message = 1 [help_text = "Service Message to Display", max_length = 254, null = False, db_index = False, blank = False];
+}
+
+message Color (XOSBase){
+ option verbose_name = "Color";
+ required string name = 1 [help_text = "Name for this color", db_index = False, max_length = 256, null = False, blank = False];
+ required string html_code = 2 [help_text = "Code for this color", db_index = False, max_length = 256, null = False, blank = False];
+}
+
+message ExampleServiceInstance (TenantWithContainer){
+ option verbose_name = "Example Service Instance";
+ required string tenant_message = 1 [help_text = "Tenant Message to Display", max_length = 254, null = False, db_index = False, blank = False];
+ optional manytoone foreground_color->Color:serviceinstance_foreground_colors = 3 [db_index = True, null = True, blank = True];
+ optional manytoone background_color->Color:serviceinstance_background_colors = 3 [db_index = True, null = True, blank = True];
+}
+
+message EmbeddedImage (XOSBase){
+ option verbose_name = "Embedded Image";
+ required string name = 1 [help_text = "Name for this image", db_index = False, max_length = 256, null = False, blank = False];
+ required string url = 2 [help_text = "URL for this image", db_index = False, max_length = 256, null = False, blank = False];
+ optional manytoone serviceinstance->ExampleServiceInstance:embedded_images = 3 [db_index = True, null = True, blank = True];
+}