Matteo Scandolo | 29f02d3 | 2017-09-07 09:46:33 -0700 | [diff] [blame] | 1 | option app_label = "exampleservice"; |
Matteo Scandolo | 10c6a4d | 2017-10-02 18:04:43 -0700 | [diff] [blame] | 2 | option name = "exampleservice"; |
Sapan Bhatia | ce657e6 | 2017-04-21 14:20:41 +0200 | [diff] [blame] | 3 | |
| 4 | message ExampleService (Service){ |
Matteo Scandolo | 10c6a4d | 2017-10-02 18:04:43 -0700 | [diff] [blame] | 5 | option verbose_name = "Example Service"; |
Scott Baker | 4239648 | 2019-01-24 08:14:48 -0800 | [diff] [blame] | 6 | option description = "Service that demonstrates integration with OpenStack compute resources"; |
| 7 | |
| 8 | required string service_message = 1 [ |
| 9 | help_text = "Service Message to Display", |
| 10 | blank = False, |
| 11 | db_index = False, |
| 12 | max_length = 254, |
| 13 | null = False]; |
Sapan Bhatia | ce657e6 | 2017-04-21 14:20:41 +0200 | [diff] [blame] | 14 | } |
| 15 | |
Scott Baker | 7a916f7 | 2017-10-25 16:52:52 -0700 | [diff] [blame] | 16 | message Color (XOSBase){ |
| 17 | option verbose_name = "Color"; |
Scott Baker | 4239648 | 2019-01-24 08:14:48 -0800 | [diff] [blame] | 18 | option description = "An html color code that may be used to color a web page"; |
| 19 | |
| 20 | required string name = 1 [ |
| 21 | help_text = "Name for this color", |
| 22 | blank = False, |
| 23 | db_index = False, |
| 24 | max_length = 256, |
| 25 | null = False]; |
| 26 | required string html_code = 2 [ |
| 27 | help_text = "HTML Code for this color", |
| 28 | blank = False, |
| 29 | db_index = False, |
| 30 | max_length = 256, |
| 31 | null = False]; |
Scott Baker | 7a916f7 | 2017-10-25 16:52:52 -0700 | [diff] [blame] | 32 | } |
Sapan Bhatia | ce657e6 | 2017-04-21 14:20:41 +0200 | [diff] [blame] | 33 | |
Scott Baker | 037ad24 | 2018-06-28 09:38:16 -0700 | [diff] [blame] | 34 | message ServiceInstanceWithCompute (ServiceInstance) { |
Scott Baker | 4239648 | 2019-01-24 08:14:48 -0800 | [diff] [blame] | 35 | option description = "ServiceInstance with relation to a ComputeServiceInstance"; |
| 36 | |
| 37 | optional manytoone compute_instance->ComputeServiceInstance:service_instance_with_computes = 1:1002 [ |
| 38 | blank=True, |
| 39 | db_index=True, |
| 40 | null=True]; |
Scott Baker | 037ad24 | 2018-06-28 09:38:16 -0700 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | message ExampleServiceInstance (ServiceInstanceWithCompute){ |
Scott Baker | ffac718 | 2017-07-27 15:21:30 -0700 | [diff] [blame] | 44 | option verbose_name = "Example Service Instance"; |
Scott Baker | 4239648 | 2019-01-24 08:14:48 -0800 | [diff] [blame] | 45 | option description = "Tenancy in SimpleExampleService, represents a web server that serves one page"; |
| 46 | |
| 47 | required string tenant_message = 1 [ |
| 48 | help_text = "Tenant Message to Display", |
| 49 | blank = False, |
| 50 | db_index = False, |
| 51 | max_length = 254, |
| 52 | null = False]; |
| 53 | optional manytoone foreground_color->Color:serviceinstance_foreground_colors = 2:1001 [ |
| 54 | blank = True, |
| 55 | db_index = True, |
| 56 | null = True]; |
| 57 | optional manytoone background_color->Color:serviceinstance_background_colors = 3:1002 [ |
| 58 | blank = True, |
| 59 | db_index = True, |
| 60 | null = True]; |
Scott Baker | 7a916f7 | 2017-10-25 16:52:52 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | message EmbeddedImage (XOSBase){ |
| 64 | option verbose_name = "Embedded Image"; |
Scott Baker | 4239648 | 2019-01-24 08:14:48 -0800 | [diff] [blame] | 65 | option description = "An embedded image that may be placed in a web page"; |
| 66 | |
| 67 | required string name = 1 [ |
| 68 | help_text = "Name for this image", |
| 69 | blank = False, |
| 70 | db_index = False, |
| 71 | max_length = 256, |
| 72 | null = False]; |
| 73 | required string url = 2 [ |
| 74 | help_text = "URL for this image", |
| 75 | blank = False, |
| 76 | db_index = False, |
| 77 | max_length = 256, |
| 78 | null = False]; |
| 79 | optional manytoone serviceinstance->ExampleServiceInstance:embedded_images = 3:1001 [ |
| 80 | help_text = "ServiceInstance that represents the web page where this embedded image should be placed", |
| 81 | blank = True, |
| 82 | db_index = True, |
| 83 | null = True]; |
Sapan Bhatia | ce657e6 | 2017-04-21 14:20:41 +0200 | [diff] [blame] | 84 | } |