summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/README.md
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-01-08 17:13:22 +0000
committerVijay Venkatesh Kumar <vv770d@att.com>2020-01-08 17:24:31 +0000
commit9b30373a6f1b1bc123250a9a598bc7a164b7e9b7 (patch)
treec1038b6a3c94582dbf8ea7f7dfeb1753832997e5 /mod/bpgenerator/README.md
parent77900bb3097491cd9fca964c111ea70724e53989 (diff)
bp-gen code clone from cli repo
dcaegen2/platform/mod will host all design component code cli/component-json-schemas and cli/dcae-cli already moved original cli repo will be marked as RO after this is merged Change-Id: Ie88dbd273d218c89a95afe0e58742a948c04eae5 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-1852 Issue-ID: DCAEGEN2-1860 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
Diffstat (limited to 'mod/bpgenerator/README.md')
-rw-r--r--mod/bpgenerator/README.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/mod/bpgenerator/README.md b/mod/bpgenerator/README.md
new file mode 100644
index 0000000..2e81745
--- /dev/null
+++ b/mod/bpgenerator/README.md
@@ -0,0 +1,61 @@
+# Blueprint Generator
+
+This tool allows the user to create a blueprint from a component spec json file
+
+# Instructions for building the tool locally
+- Change directory into the root directory of the project (where the pom is located)
+- Run the command: `mvn clean install`
+- This will create a jar file and a tar file
+- To execute the application
+
+```bash
+java -jar target/blueprint-generator-1.2.1-SNAPSHOT-executable.jar
+```
+
+
+# Instructions for running BlueprintGenerator:
+
+## Instructions for running:
+
+
+-Run the program on the command line with the following tags:
+OPTIONS:
+- -p: The path to where the final blueprint yaml file will be created (Required)
+- -i: The path to the JSON spec file (required)
+- -n: Name of the blueprint (optional)
+- -t: the path to the import yaml file (optional)
+- -d: Onvoke the dmaap plugin (optional)
+- -o: The service component name override (optional)
+
+
+it will look like this:
+
+```bash
+java -jar target/blueprint-generator-1.2.1-SNAPSHOT-executable.jar blueprint -p Blueprints -i ComponentSpecs/TestComponentSpec.json -n HelloWorld -d
+```
+
+This command will create a blueprint from the component spec TestComponentSpec. The blueprint file name will be called HelloWorld.yaml and it will be in the directory Blueprints. The blueprint will also contain the DMaaP plugin.
+
+## Extra information:
+- The component spec must be of the same format as stated in the onap [readthedocs](https://onap.readthedocs.io/en/latest/submodules/dcaegen2.git/docs/sections/components/component-specification/common-specification.html#working-with-component-specs) page
+- If the tag says required then the program will not run without those tags being there
+- If the tag says optional then it is not necessary to run the program with those tags
+- If you do not add a -n tag the blueprint name will default to what it is in the component spec
+- If the directory you specified in the -p tag does not already exist the directory will be created for you
+- The -t flag will override the default imports set for the blueprints. To see an example of how the import yaml file should be structured see the testImports.yaml file under the folder TestCases.
+
+
+#Instructions for policy models
+
+-Run the program on the command line with the following tags:
+OPTIONS:
+- -i: The path to the JSON spec file (required)
+- -p: The output path for all of the models (required)
+
+it will look like this:
+
+```bash
+java -jar target/blueprint-generator-1.2.1-SNAPSHOT-executable.jar policy -p models -i ComponentSpecs/TestComponentSpec.json
+```
+
+This command will create a directory called models and put the policy models created from the component spec given in that directory. (A component spec may generate multiple policy models) \ No newline at end of file