blob: 0b5190ad4586b0bce24b8b21f761d1eeff4ba1ac [file] [log] [blame]
plyxproto
=========
plyxproto is a Python parser and processor for the xproto model definition language.
xproto is a syntax defined and supported by XOS (https://github.com/opencord/xos).
Here is an example of an xproto file:
```protobuf
message Slice (PlCoreBase){
required string name = 1 [max_length = 80, content_type = "stripped", blank = False, help_text = "The Name of the Slice", null = False, db_index = False];
required bool enabled = 2 [help_text = "Status for this Slice", default = True, null = False, db_index = False, blank = True];
required bool omf_friendly = 3 [default = False, null = False, db_index = False, blank = True];
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];
required string slice_url = 5 [db_index = False, max_length = 512, null = False, content_type = "url", blank = True];
required manytoone site->Site:slices = 6 [help_text = "The Site this Slice belongs to", null = False, db_index = True, blank = False];
required int32 max_instances = 7 [default = 10, null = False, db_index = False, blank = False];
optional manytoone service->Service:slices = 8 [db_index = True, null = True, blank = True];
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'))"];
optional string exposed_ports = 10 [db_index = False, max_length = 256, null = True, blank = True];
optional manytoone serviceClass->ServiceClass:slices = 11 [db_index = True, null = True, blank = True];
optional manytoone creator->User:slices = 12 [db_index = True, null = True, blank = True];
optional manytoone default_flavor->Flavor:slices = 13 [db_index = True, null = True, blank = True];
optional manytoone default_image->Image:slices = 14 [db_index = True, null = True, blank = True];
optional manytoone default_node->Node:slices = 15 [db_index = True, null = True, blank = True];
optional string mount_data_sets = 16 [default = "GenBank", max_length = 256, content_type = "stripped", blank = True, null = True, db_index = False];
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];
required manytomany tags->Tag = 18 [db_index = False, null = False, blank = True];
}
```
More details on xproto and XOS can be found via the link below, and at the aforementioned xos homepage.
https://github.com/opencord/xos/blob/master/docs/dev/xproto.md