blob: f17dc46fbbbc7315efa62325d6d1d30ae1f9207d [file] [log] [blame]
Scott Bakeredbb2322018-05-08 11:46:25 -07001option app_label = "simpleexampleservice";
2option name = "simpleexampleservice";
3
4message SimpleExampleService (Service){
5 option verbose_name = "Simple Example Service";
Scott Baker58723222019-01-24 07:56:12 -08006 option description = "Service that demonstrates integration with Kubernetes compute resources";
7
8 required string service_message = 1 [
9 help_text = "Service Message to display in web page",
Scott Baker417e6de2019-04-09 16:23:32 -070010 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080011 optional string service_secret = 2 [
Scott Baker417e6de2019-04-09 16:23:32 -070012 help_text = "Service Secret to place in a file",
13 text = True];
Scott Bakeredbb2322018-05-08 11:46:25 -070014}
15
Scott Baker58723222019-01-24 07:56:12 -080016// Note: Named ColorNew to prevent name collision with ExampleService's Color.
17
Scott Bakeredbb2322018-05-08 11:46:25 -070018message ColorNew (XOSBase){
19 option verbose_name = "Color";
Scott Baker58723222019-01-24 07:56:12 -080020 option description = "An html color code that may be used to color a web page";
21
22 required string name = 1 [
23 help_text = "Name for this color",
Scott Baker06f77ad2019-03-08 13:37:54 -080024 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080025 required string html_code = 2 [
26 help_text = "HTML Code for this color",
Scott Baker06f77ad2019-03-08 13:37:54 -080027 max_length = 256];
Scott Bakeredbb2322018-05-08 11:46:25 -070028}
29
Scott Bakered94fc42018-12-20 06:57:49 -080030// Note: Named ServiceInstanceWithCompute2 to prevent name collision with ExampleService.ServiceInstanceWithCompute.
31// Expect this model to eventually move to the core.
32
33message ServiceInstanceWithCompute2 (ServiceInstance) {
Scott Baker58723222019-01-24 07:56:12 -080034 option description = "ServiceInstance with relation to a ComputeServiceInstance";
35
36 optional manytoone compute_instance->ComputeServiceInstance:service_instance_with_computes = 1:1001 [
37 help_text = "ComputeServiceInstance that holds compute resources for this ServiceInstance",
Scott Baker8838dfe2019-03-12 14:28:57 -070038 db_index=True];
Scott Bakeredbb2322018-05-08 11:46:25 -070039}
40
Scott Bakered94fc42018-12-20 06:57:49 -080041message SimpleExampleServiceInstance (ServiceInstanceWithCompute2){
Scott Bakeredbb2322018-05-08 11:46:25 -070042 option verbose_name = "Example Service Instance";
Scott Baker58723222019-01-24 07:56:12 -080043 option description = "Tenancy in SimpleExampleService, represents a web server that serves one page";
44
45 required string tenant_message = 1 [
46 help_text = "Tenant Message to Display",
Scott Baker417e6de2019-04-09 16:23:32 -070047 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080048 optional manytoone foreground_color->ColorNew:serviceinstance_foreground_colors = 2:1001 [
49 help_text = "Foreground color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080050 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080051 optional manytoone background_color->ColorNew:serviceinstance_background_colors = 3:1002 [
52 help_text = "Background color to use in web page",
Scott Baker06f77ad2019-03-08 13:37:54 -080053 db_index = True];
Scott Baker58723222019-01-24 07:56:12 -080054 optional string tenant_secret = 4 [
Scott Baker417e6de2019-04-09 16:23:32 -070055 help_text = "Tenant Secret to place in a file",
56 text = True];
Scott Bakeredbb2322018-05-08 11:46:25 -070057}
58
Scott Baker58723222019-01-24 07:56:12 -080059// Note: Named EmbeddedImageNew to prevent name collision with ExampleService's EmbeddedImage.
60
Scott Bakeredbb2322018-05-08 11:46:25 -070061message EmbeddedImageNew (XOSBase){
62 option verbose_name = "Embedded Image";
Scott Baker58723222019-01-24 07:56:12 -080063 option description = "An embedded image that may be placed in a web page";
64
65 required string name = 1 [
66 help_text = "Name for this image",
Scott Baker06f77ad2019-03-08 13:37:54 -080067 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080068 required string url = 2 [
69 help_text = "URL for this image",
Scott Baker06f77ad2019-03-08 13:37:54 -080070 max_length = 256];
Scott Baker58723222019-01-24 07:56:12 -080071 optional manytoone serviceinstance->SimpleExampleServiceInstance:embedded_images = 3:1001 [
72 help_text = "ServiceInstance that represents the web page where this embedded image should be placed",
Scott Baker06f77ad2019-03-08 13:37:54 -080073 db_index = True];
Scott Bakeredbb2322018-05-08 11:46:25 -070074}