diff --git a/doc/naas/lcm_rules_intro.md b/doc/naas/lcm_rules_intro.md index 1951ea0481806b54e52568c2e46b7d6739ba319b..f7d70588e8a9b783d071a147571db4d57183fe95 100644 --- a/doc/naas/lcm_rules_intro.md +++ b/doc/naas/lcm_rules_intro.md @@ -14,8 +14,7 @@ Lifecycle Management Rules: Defining complex conditions and actions during the l [](./lcm/img02.png) - - ## How is it possible to intervene in the workflow process and affect it? +## How is it possible to intervene in the workflow process and affect it? LCM Rules are used for defining complex conditions and actions during the lifecycle of a service. In Openslice there are the following types of rules defined: diff --git a/doc/service_design/lcmrules/examples.md b/doc/service_design/lcmrules/examples.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..52065b0742c5cd841f154b145ce2582baa3fd897 100644 --- a/doc/service_design/lcmrules/examples.md +++ b/doc/service_design/lcmrules/examples.md @@ -0,0 +1,79 @@ +# Examples of Rules + + +The following images provide some examples of rules. + +### Define variables according to cases + +In the following example we : + +* define a String variable. +* Then according to the Area of Service selected from the Service Order of the Service Specification we need to define it properly. +* We output the value to the OSOM Log +* Define dynamically the value of another parameter (This is fictional) and then do some other condition check + +The strAreaCodes could be passed then e.g. to NFVO for instantiation of services to these cells. + + +[](./images/lcm/lcmfig9.png) + + + + +### Define Rules to create a resource for a Kubernetes Operator + +* Modify the _CR_SPEC characteristic +* Add an "Input with variables block" +* Add a multiline Text block +* Mark with %s, %d, etc the parameters to modify with some action +* Add a list with the variables and their values + +in the example we modify a YAML spec with parama, paramb, action values from the characteristics spec.parama, spec.paramb, spec.action + +[](./images/lcm/lcmfig15.png) + + +### Define complex OSM configs for DAY 0 + +The following displays some complex examples for defining the parameters to pass to the NFV. In this case is OSM. + +* NOTE: The OSM_CONFIG characteristic of a service is the one that it is used in orchestration to instantiate NS from OSM + +* check the variable strTargetsParam. It is passed to the variable strOsmConfig3 which is executed if the Number of Cameras is more than 100. +* if the Video quality requested is 3, then the Maximum Namber of camers will be 8. Check the OSM detailed configuration block and its syntax. +* if the Video quality requested is 2, we use a simpler OSM Config block to configure the parameter OSM_CONFIG. We just injected a json text ( watch the Escape of the string for the Quotes!) +* if the Video quality requested is 1, again we use a simpler OSM Config block to configure the parameter OSM_CONFIG. We use as injected json text a variable constructed later + + +[](./images/lcm/lcmfig10.png) + + +### Define and instantiate different services according to Service Order request + +In the following example we would like to offer a service either as Platinum, Gold or Silver. Depending on the selection we need to instantiate different services. + +There are different ways to accomplish this: + +* create dynamically New Service Orders of RFSs with equivalent quality of Services +* change for example the VIMs that you deploy the NS +* change the NSD (that is use different VNFs) + +The following image displays for example the latter case. + +[](./images/lcm/lcmfig11.png) + + +### Call an external RESTful service + +This is useful in cases for example of alarms , external logging, calling other services e.g. email or even a complex algorithm written in other language e.g. call an external service and get a result. (service e.g. a Python service) + + +[](./images/lcm/lcmfig12.png) + +[](./images/lcm/lcmfig13.png) + +### Create New Service Orders + +The following example calls to Order a New Service Specification with specific Parameter Values + +[](./images/lcm/lcmfig14.png) \ No newline at end of file diff --git a/doc/service_design/lcmrules/images/lcm/lcmfig15.png b/doc/service_design/lcmrules/images/lcm/lcmfig15.png new file mode 100644 index 0000000000000000000000000000000000000000..0005c110adce2a14ba143ee54b46e948d4f81c19 Binary files /dev/null and b/doc/service_design/lcmrules/images/lcm/lcmfig15.png differ diff --git a/doc/service_design/lcmrules/intro.md b/doc/service_design/lcmrules/intro.md index d6414f5582e5e41adfd35487965bf2354a8dda8a..05a0b91406c78cf59837ac46b279b30499a14655 100644 --- a/doc/service_design/lcmrules/intro.md +++ b/doc/service_design/lcmrules/intro.md @@ -84,17 +84,8 @@ The following figure is an example of such a rule design. The rule for example w ## The blocks library -The following images describe some blocks found in the library. +See our [LCM Blocks specification](./specification.md) -Blockly has syntax rules. It helps with colours to define them. - -So for example a parameter that is a Number cannot be "glued" with a String. Will need some conversion first - -[](./images/lcm/lcmfig4.png) -[](./images/lcm/lcmfig5.png) -[](./images/lcm/lcmfig6.png) -[](./images/lcm/lcmfig7.png) -[](./images/lcm/lcmfig8.png) ## Examples of Rules diff --git a/doc/service_design/lcmrules/specification.md b/doc/service_design/lcmrules/specification.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b89323f14dbf1551c403df86a7b38efb0e0cbb3c 100644 --- a/doc/service_design/lcmrules/specification.md +++ b/doc/service_design/lcmrules/specification.md @@ -0,0 +1,17 @@ + +# LCM Blocks specification + + +## Intended Audience: Service Designers + +The following images describe some blocks found in the library. + +Blockly has syntax rules. It helps with colours to define them. + +So for example a parameter that is a Number cannot be "glued" with a String. Will need some conversion first + +[](./images/lcm/lcmfig4.png) +[](./images/lcm/lcmfig5.png) +[](./images/lcm/lcmfig6.png) +[](./images/lcm/lcmfig7.png) +[](./images/lcm/lcmfig8.png)