diff --git a/docs/versions/latest/General/Cheatsheets/abx-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/abx-plugin-arguments.md index 23194df8b..6997bc129 100644 --- a/docs/versions/latest/General/Cheatsheets/abx-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/abx-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'abx-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/actions-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/actions-plugin-arguments.md index 51df1053e..cda3840e1 100644 --- a/docs/versions/latest/General/Cheatsheets/actions-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/actions-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'o11n-actions-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/bsc-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/bsc-plugin-arguments.md index 50290c2ab..209093d66 100644 --- a/docs/versions/latest/General/Cheatsheets/bsc-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/bsc-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'bsc-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/cs-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/cs-plugin-arguments.md index 2a186ecda..11e44e0ca 100644 --- a/docs/versions/latest/General/Cheatsheets/cs-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/cs-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'cs-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/polyglot-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/polyglot-plugin-arguments.md index c3835e9fd..ae36df504 100644 --- a/docs/versions/latest/General/Cheatsheets/polyglot-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/polyglot-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'o11n-polyglot-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/ssh-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/ssh-plugin-arguments.md index 5ab67318c..0d1ad3d0c 100644 --- a/docs/versions/latest/General/Cheatsheets/ssh-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/ssh-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'ssh-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:ssh-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:ssh-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:ssh-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:ssh-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/typescript-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/typescript-plugin-arguments.md index 2393b373a..6f74ce67e 100644 --- a/docs/versions/latest/General/Cheatsheets/typescript-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/typescript-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'o11n-typescript-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vcd-ng-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vcd-ng-plugin-arguments.md index 9054ab487..6233e16bf 100644 --- a/docs/versions/latest/General/Cheatsheets/vcd-ng-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vcd-ng-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vcd-ng-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vra-ng-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vra-ng-plugin-arguments.md index 4069be4b0..dc7b7289b 100644 --- a/docs/versions/latest/General/Cheatsheets/vra-ng-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vra-ng-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vra-ng-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vra-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vra-plugin-arguments.md index b975c1118..4b197a6e9 100644 --- a/docs/versions/latest/General/Cheatsheets/vra-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vra-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vra-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vrealize-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vrealize-plugin-arguments.md index 8d8a14710..e05f3932d 100644 --- a/docs/versions/latest/General/Cheatsheets/vrealize-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vrealize-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vrealize-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vrli-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vrli-plugin-arguments.md index ef8bf4ffe..85d7ee8a7 100644 --- a/docs/versions/latest/General/Cheatsheets/vrli-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vrli-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vrli-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/vrops-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/vrops-plugin-arguments.md index 40e1c1fef..eb5d3dd2e 100644 --- a/docs/versions/latest/General/Cheatsheets/vrops-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/vrops-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'vrops-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/General/Cheatsheets/xml-plugin-arguments.md b/docs/versions/latest/General/Cheatsheets/xml-plugin-arguments.md index 9bd20c70b..2bb3f03f6 100644 --- a/docs/versions/latest/General/Cheatsheets/xml-plugin-arguments.md +++ b/docs/versions/latest/General/Cheatsheets/xml-plugin-arguments.md @@ -1,7 +1,7 @@ [ERROR] [ERROR] groupId: 'com.vmware.pscoe.maven.plugins' [ERROR] artifactId: 'o11n-xml-package-maven-plugin' -[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] version: '2.40.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:2.40.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:jar:2.40.1-SNAPSHOT [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. diff --git a/docs/versions/latest/Release.md b/docs/versions/latest/Release.md index 6726bc550..e328b5945 100644 --- a/docs/versions/latest/Release.md +++ b/docs/versions/latest/Release.md @@ -24,595 +24,7 @@ [//]: # (Optional But higlhy recommended Specify *NONE* if missing) [//]: # (#### Relevant Documentation:) -### *Error handling for workflow canvas elements* - -There is a new decorator added `@Err` that can be used with arguments. This decorator will mean that the argument will be bound to the exeption if it occurs. -Note, you add it as normal `@In` or `@Out` decorators, but the variable should not be used in the method. - -Furthermore, supported canvas items now have `exception` parameter that can be used to specify the method that will handle the exception. - -#### Supported Canvas Items - -- `@Item` -- `@AsyncWorkflowItem` -- `@ScheduledWorkflowItem` -- `@WorkflowItem` -- `@ActionItem` -- `@DecisionItem` -- `@WaitingTimerItem` - -#### Example - -```typescript -import { Workflow, Out, In, Err, RootItem, Item } from "vrotsc-annotations"; - -@Workflow({ - name: "Example", - path: "VMware/PSCoE", - attributes: { - error: { - type: "string" - } - } -}) -export class Example { - @Item({ - target: "end", - exception: "exceptionHandle" - }) - @RootItem() - public start(@Err error: string) { - if (true) { - throw new Error("Error"); - } - } - - @Item({ target: "end" }) - public exceptionHandle(@In error: string) { - System.log(`Error: ${error}`); - } -} -``` -### Support of Objects in the VROES.Shims.arrayFrom() Method - -Add support for objects in the `VROES.Shims.arrayFrom()` method so its behavior is similar to the standard `Array.from()` method. - -### *Better ordering of the canvas items* - -The canvas items are now ordered based on an tree algorithm. - -Example: - -From input: - -```ts -const nodes = [ - { name: "A", targets: ["B"] }, - { name: "B", targets: ["C"] }, - { name: "C", targets: ["D", "G"] }, - { name: "D", targets: ["E", "F"] }, - { name: "E", targets: ["C"] }, - { name: "F", targets: ["O"] }, - { name: "G", targets: ["H"] }, - { name: "H", targets: ["I"] }, - { name: "I", targets: ["J", "K", "L", "M"] }, - { name: "J", targets: [] }, - { name: "K", targets: [] }, - { name: "L", targets: [] }, - { name: "M", targets: [] }, - { name: "O", targets: ["P"] }, - { name: "P", targets: ["Q"] }, - { name: "Q", targets: [] }, - - // Second start? - { name: "S", targets: ["T"] }, - { name: "T", targets: ["U", "W", "D"] }, - { name: "U", targets: [] }, - { name: "W", targets: [] }, - { name: "X", targets: ["Y"] }, - { name: "Y", targets: [] }, -]; -``` - -We get: -```log -.................................................................................................... -.................................................................................................... -.................................................................................................... -..............................F....O....P....Q...................................................... -.................................................................................................... -.................................................................................................... -....................D....E.......................................................................... -.................................................................................................... -.....A....B....C...................J................................................................ -.................................................................................................... -.................................................................................................... -....................G....H....I..................................................................... -.................................................................................................... -.....S....T....U...................K................................................................ -.................................................................................................... -.................................................................................................... -.................................................................................................... -.................................................................................................... -...............W...................L................................................................ -.................................................................................................... -.................................................................................................... -.................................................................................................... -.................................................................................................... -...................................M................................................................ -.................................................................................................... -.................................................................................................... -``` -### Support python 3.10 runtime - -Add support for python 3.10 runtime in Orchestrator. This is now the default, since python 3.7 is deprecated. - -### *New `@ActionItem` decorator for Workflows* - -The new decorator gives you the ability to specify a canvas item that calls an action. - -#### Supported Parameters - -- `target` - The name of the next in line item. Same as `@Item`. -- `scriptModule` - The path of the action you want to call and the action name, separated by `/`. Example: `com.vmware.pscoe.library.general/echo`. - -In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. - -#### Outputs - -There is a requirement to have only one output, and it will be of type `ActionResult`. - -#### Example - -```typescript -import { Workflow, Out, In, Item, ActionItem } from "vrotsc-annotations"; - -@Workflow({ - name: "Example", - path: "VMware/PSCoE", - attributes: { - first: { - type: "number" - }, - second: { - type: "number" - }, - actionResult: { - type: "ActionResult" - } - } -}) -export class Example { - @ActionItem({ - target: "printActionResult", - scriptModule: "com.vmware.pscoe.onboarding.sgenov.actions/test" - }) - public callTestAction(@In first: number, @In second: number, @Out actionResult: ActionResult) { - } - - @Item({ target: "end" }) - public printActionResult(@In actionResult: ActionResult) { - System.log(`Action result: ${actionResult.getResult()}`); - } -} -``` - -### *New `DefaultErrorHandler` decorator for Workflows* - -This decorator is used to specify a default error handler. It can be bound either to a workflow item component or workflow end. - -#### Supported Parameters - -- `target` - target item to be attached to the default error handler, could be one of workflow item or workflow end. -- `exceptionVariable` - Exception variable that will hold the exception data when triggered. - -In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. - -Example: - -```typescript -import { - Workflow, - RootItem, - In, - Out, - Item, - DefaultErrorHandler, - WorkflowEndItem, -} from "vrotsc-annotations"; - -@Workflow({ - name: "Default Error Handler Custom Item", - path: "VMware/PSCoE", - description: - "Default error handler workflow with error handler redirecting to a workflow item", - attributes: { - errorMessage: { - type: "string", - }, - }, -}) -export class HandleDefaultError { - @RootItem() - public initiateWorkflow() { - System.log("Initiating workflow execution"); - } - - @Item({ - target: "workflowEnd", - }) - public processError(@In errorMessage: string) { - System.log( - `Processing error using custom task with message '${errorMessage}'` - ); - } - - @DefaultErrorHandler({ - exceptionVariable: "errorMessage", - target: "processError", - }) - public defaultErrorHandler(@Out errorMessage: string) { - // NOOP - } - - @WorkflowEndItem({ - endMode: 0, - exceptionVariable: "errorMessage", - }) - public workflowEnd(@Out errorMessage: string) { - System.log(`Terminating workflow with error ${errorMessage}`); - } -} -``` - -### *New `@WorkflowEndItem` decorator for Workflows* - -The decorator is used to specify a custom workflow end item. - -#### Supported Parameters - -- `endMode` - End mode of the component, could be one of 0 or 1, where 0 is exit success and 1 is error. -- `exceptionVariable` - Exception variable that will hold the exception data when triggered. -- `businessStatus` - Value of the business status in the end component. - -Example: - -```typescript -import { Workflow, RootItem, WorkflowEndItem } from "vrotsc-annotations"; - -@Workflow({ - name: "Workflow End Exception", - path: "VMware/PSCoE", - description: "Workflow with root and end item with end mode 1", - attributes: { - errorMessage: { - type: "string", - }, - businessStatus: { - type: "string", - }, - endMode: { - type: "number", - }, - }, -}) -export class WorkflowEnd { - @RootItem() - public initiateWorkflow() { - // NOOP - } - - @WorkflowEndItem({ - endMode: 1, - exceptionVariable: "errorMessage", - businessStatus: "Bad", - }) - public workflowEnd() { - // NOOP - } -} -``` - -### *New `AsyncWorkflowItem` decorator for Workflows* - -The decorator is used to specify a canvas item that calls an asynchronous workflow. - -- `@AsyncWorkflowItem({target: "", linkedItem: "" })` - - `target` - The name of the next in line item. - - `linkedItem` - The ID of the workflow to call - -In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. - -#### Outputs - -Special output is needed for the AsyncWorkflowItem. - -- `wfToken` - {WorkflowToken} is required. The name **must** be `wfToken`. If this is missing an error is thrown. We don't check if the type is `WorkflowToken` but Aria Orchestrator will complain. - -#### Inputs - -No special inputs are needed for the AsyncWorkflowItem. - - -#### Example - -```typescript -import { Workflow, Out, In, Item, RootItem, AsyncWorkflowItem } from "vrotsc-annotations"; - -@Workflow({ - name: "Async Workflow Test", - path: "VMware/PSCoE", - description: "Calling another workflow asynchronously and binding values correctly", - attributes: { - waitingTimer: { - type: "Date" - }, - counter: { - type: "number" - }, - first: { - type: "number" - }, - second: { - type: "number" - }, - wfToken: { - type: "WorkflowToken" - } - } -}) -export class HandleNetworkConfigurationBackup { - @AsyncWorkflowItem({ - target: "printAsync", - linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" - }) - public asyncCall(@In first: number, @In second: number, @Out wfToken: WorkflowToken) { } - - @Item({ target: "callAsyncWf" }) - public prepareItems(@In @Out first: number, @In @Out second: number) { - first = 1; - second = 2; - } - - @Item({ target: "end" }) - public printAsync(@In wfToken: WorkflowToken) { - System.log(`Workflow token: ${wfToken.id} and state: ${wfToken.state}`); - System.log("Workflow finished"); - } - - @Item({ target: "prepareItems", exception: "" }) - @RootItem() - public start() { - System.log("Starting workflow"); - } -} -``` - -### *New `ScheduledWorkflowItem` decorator for Workflows* - -The new decorator gives you the ability to specify a canvas item that schedules a Workflow. - -- `@ScheduledWorkflowItem({target: "", linkedItem: "" })` - - `target` - The name of the next in line item. - - `linkedItem` - The ID of the workflow to schedule - -In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. - -#### Inputs - -Special input is needed for the ScheduledWorkflowItem. - -- `workflowScheduleDate` - {Date} is required. The name **must** be `workflowScheduleDate`. If this is missing an error is thrown. We don't check if the type is `Date` but Aria Orchestrator will complain. - -#### Outputs - -Special output is needed for the ScheduledWorkflowItem. - -- `scheduledTask` - {Task} is optional. If it's missing nothing will happen, if it's added, then the name **must** be `scheduledTask`. This is the task that is scheduled. - -#### Example - -```ts -import { Workflow, Out, In, Item, RootItem, DecisionItem, WaitingTimerItem, WorkflowItem, ScheduledWorkflowItem } from "vrotsc-annotations"; - -@Workflow({ - name: "Example Waiting Timer", - path: "VMware/PSCoE", - attributes: { - waitingTimer: { - type: "Date" - }, - counter: { - type: "number" - }, - first: { - type: "number" - }, - second: { - type: "number" - }, - result: { - type: "number" - }, - workflowScheduleDate: { - type: "Date" - }, - scheduledTask: { - type: "Task" - } - } -}) -export class HandleNetworkConfigurationBackup { - @DecisionItem({ target: "waitForEvent", else: "prepareItems" }) - public decisionElement(waitingTimer: Date) { - return waitingTimer !== null; - } - - @Item({ target: "callOtherWf" }) - public prepareItems(@In @Out first: number, @In @Out second: number, @In @Out workflowScheduleDate: Date) { - first = 1; - second = 2; - workflowScheduleDate = System.getDate("1 minute from now", undefined); - } - - @WorkflowItem({ - target: "print", - linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" - }) - public callOtherWf(@In first: number, @In second: number, @Out result: number) { - } - - - @Item({ target: "scheduleOtherWf" }) - public print(@In result: number) { - System.log("Result: " + result); - } - - @ScheduledWorkflowItem({ - target: "printScheduledDetails", - linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" - }) - public scheduleOtherWf(@In first: number, @In second: number, @In workflowScheduleDate: Date, @Out scheduledTask: Task) { - } - - @Item({ target: "end" }) - public printScheduledDetails(@In scheduledTask: Task) { - System.log(`Scheduled task: ${scheduledTask.id}, [${scheduledTask.state}]`); - } - - @Item({ target: "decisionElement", exception: "" }) - public execute(@Out @In waitingTimer: Date, @Out @In counter: number): void { - if (!counter) { - counter = 0; - } - - counter++; - - if (counter < 2) { - const tt = Date.now() + 5 * 1000; - waitingTimer = new Date(tt); - } else { - waitingTimer = null; - } - - System.log("Counter: " + counter); - System.log("Waiting Timer: " + waitingTimer); - } - - @Item({ target: "execute", exception: "" }) - @RootItem() - public start() { - System.log("Starting workflow"); - } - - @WaitingTimerItem({ target: "execute" }) - public waitForEvent(@In waitingTimer: Date) { - } -} -``` - -### *New `WorkflowItem` decorator for Workflows* - -The new Decorator gives you the ability to specify a canvas item that calls a Workflow. - -- `@WorkflowItem({target: "", linkedItem: "" })` - - `target` - The name of the next in line item. - - `linkedItem` - The ID of the workflow to call - -In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. - -Example: - -```typescript -import { - Workflow, - Out, - In, - Item, - RootItem, - DecisionItem, - WaitingTimerItem, - WorkflowItem, -} from "vrotsc-annotations"; - -@Workflow({ - name: "Example Waiting Timer", - path: "VMware/PSCoE", - attributes: { - waitingTimer: { - type: "Date", - }, - counter: { - type: "number", - }, - first: { - type: "number", - }, - second: { - type: "number", - }, - result: { - type: "number", - }, - }, -}) -export class HandleNetworkConfigurationBackup { - @DecisionItem({ target: "waitForEvent", else: "prepareItems" }) - public decisionElement(waitingTimer: Date) { - return waitingTimer !== null; - } - - @Item({ target: "callOtherWf" }) - public prepareItems(@In @Out first: number, @In @Out second: number) { - first = 1; - second = 2; - } - - @WorkflowItem({ - target: "print", - linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0", - }) - public callOtherWf( - @In first: number, - @In second: number, - @Out result: number - ) {} - - @Item({ target: "end" }) - public print(@In result: number) { - System.log("Result: " + result); - } - - @Item({ target: "decisionElement", exception: "" }) - public execute(@Out @In waitingTimer: Date, @Out @In counter: number): void { - if (!counter) { - counter = 0; - } - - counter++; - if (counter < 2) { - const tt = Date.now() + 5 * 1000; - waitingTimer = new Date(tt); - } else { - waitingTimer = null; - } - - System.log("Counter: " + counter); - System.log("Waiting Timer: " + waitingTimer); - } - - @Item({ target: "execute", exception: "" }) - @RootItem() - public start() { - System.log("Starting workflow"); - } - - @WaitingTimerItem({ target: "execute" }) - public waitForEvent(@In waitingTimer: Date) { - // NOOP - } -} -``` +[//]: # (Improvements -> Bugfixes/hotfixes or general improvements) ## Improvements @@ -627,186 +39,6 @@ export class HandleNetworkConfigurationBackup { [//]: # (Optional But higlhy recommended Specify *NONE* if missing) [//]: # (#### Relevant Documentation:) - -### *`for each` statements are now being converted by `vropkg` when pulling* - -`for each` is valid syntax in the Java's Rhino engine, but not in normal JS. - -#### Previous Behavior - -When pulling a workflow with `for each` statements, the action would be pulled, but then would not be able to be pushed as the syntax is invalid. - -#### New Behavior - -`for each` statements are now being converted to `for` statements when pulling a workflow. - -Example: - -```js -var test = ["ya", "da"] - -for each (var i in test) { - for each (var y in test) { - System.log(y) - for each(var z in test){System.log(z)} - } - System.log(i) -} - -for each ( -var n in test -) { - System.log(n) -} - -for (var i in test) { - System.log(i) -} - -for (var $index in test) { - var i = test[$index] - System.log(i) -} -``` - -is converted to - - -```js -/** - * @return {string} - */ -(function() { - var test = ["ya", "da"] - - for (var $index_i in test) { - var i = test[$index_i]; - for (var $index_y in test) { - var y = test[$index_y]; - System.log(y) - for (var $index_z in test) { - var z = test[$index_z]; - System.log(z) - } - } - System.log(i) - } - - for (var $index_n in test) { - var n = test[$index_n]; - System.log(n) - } - for (var i in test) { - System.log(i) - } - - for (var $index in test) { - var i = test[$index] - System.log(i) - } -}); -``` - -### *ABX archetype build issue, cannot compile* - -Fixed an issue where the ABX archetype could not compile due to an old version of the `xmlbuilder2` package. - -#### Previous Behavior - -We were getting a build error when trying to compile the ABX archetype: - -```log -info: Error ts(1110) /root/vro/polyglot_test_project/node_modules/@types/node/crypto.d.ts (3569,17): Type expected. -info: Error ts(1005) /root/vro/polyglot_test_project/node_modules/@types/node/events.d.ts (105,28): ',' expected. -... -info: Error ts(1005) /root/vro/polyglot_test_project/node_modules/@types/node/util.d.ts (1763,26): ';' expected. -info: Error ts(1128) /root/vro/polyglot_test_project/node_modules/@types/node/util.d.ts (1765,1): Declaration or statement expected. -info: Exit status: 1 -info: Compilation complete -/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:123 - throw new Error('Found compilation errors'); - ^ - -Error: Found compilation errors - at NodejsStrategy.compile (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:123:19) - at NodejsStrategy. (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:52:18) - at Generator.next () - at fulfilled (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:5:58) -[ERROR] Command execution failed. -org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) - at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) - at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) -... - at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) - at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) - at java.lang.Thread.run (Thread.java:840) -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD FAILURE -[INFO] ------------------------------------------------------------------------ -``` - -#### New Behavior - -The ABX archetype now compiles successfully. - -### Add missing classes to `o11n-plugin-aria` and add missing methods to the existing classes - -#### Previous Behavior - -Many classes are missing completely compared with vRO API and some existing classes were missing some methods - -#### Current Behavior - -The following classes were added to `o11n-plugin-aria`: - -- VraInfrastructureClient -- VraCloudAccountService -- VraUpdateCloudAccountVsphereSpecification -- VraCloudAccountVsphereSpecification -- VraRegionSpecification -- VraCloudAccountVsphere -- VraCloudZoneService -- VraZone -- VraHref -- VraZoneSpecification -- VraTag -- VraDataCollectorService -- VraRequestService -- VraRequestTracker -- VraBlockDevice -- VraBlockDeviceResult -- VraBlockDeviceSpecification -- VraConstraint -- VraChangeSecurityGroupSpecification -- VraNetworkInterfaceSpecification - -The following missing methods were added to the exist classes: - -- Class `VraHost` - - `destroy` - - `createInfrastructureClient` - -#### Related issue - - - -### Change default return Object of `Array.from()` Method to be empty array - -#### Previous Behavior - -In case the object type of the array-like Object does not match any of the expected types (e.g. is a Number) the default case of `Array.from()` returns a clone of the object. This does not match the desired behaviour according to the official documentation. - -```js -Array.from(10) // Output: 10 -``` - -#### Current Behavior -In case the object type of the array-like Object does not match any of the expected types (e.g. is a Number) the default case of `Array.from()` returns an empty array. - -```js -Array.from(10) // Output: [] -``` - ## Upgrade procedure [//]: # (Explain in details if something needs to be done) diff --git a/docs/versions/v2.41.0/Components/Archetypes/General/Goals/Vrealize Clean.md b/docs/versions/v2.41.0/Components/Archetypes/General/Goals/Vrealize Clean.md new file mode 100644 index 000000000..80c1ec892 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/General/Goals/Vrealize Clean.md @@ -0,0 +1,36 @@ +# Vrealize Clean + +`vrealize:clean` is a goal used to clean up archetype packages on a given environment. + +## Overview + +`vrealize:clean` gives us a lot of flexibility in what is going to be deleted. You can find more about the different options in the sections below. + +## Table Of Contents + +1. [Archetype Support for vrealize:clean](#archetype-support-for-vrealizeclean) +2. [Usage](#usage) + +### Archetype Support for vrealize:clean + +| Archetype | Supported | Comment | +|-----------|-----------|-------------------------------------------------------------------| +| vra | Yes | - | +| vro | Yes | - | +| vcd | Partial | It does not support dryRunning | +| abx | No | Not implemented | +| vrops | No | Not implemented | +| vra-ng | No | Aria Automation does not support packaging | +| vrli | No | vRLI does not provide native package support | +| cs | No | Code Stream Services does not provide native support for packages | + +### Usage + +```bash +mvn vrealize:clean -DincludeDependencies=true -DcleanUpOldVersions=true -DcleanUpLastVersion=false -Ddryrun=true -P${PROFILE} +``` + +- includeDependencies - a flag depicting if dependencies should also be deleted +- cleanUpOldVersions - a flag depicting if old versions of the package (and dependencies in case of includeDependencies) should be deleted +- cleanUpLastVersion - a flag depicting if the latest version should also be deleted before importing +- dryrun - Dryrun or not diff --git a/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/New Project.md b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/New Project.md new file mode 100644 index 000000000..ab4b5dea5 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/New Project.md @@ -0,0 +1,32 @@ +# New Project + +## Table Of Contents + +- [Generate A New Project](#generate-a-new-project) + +### Generate A New Project + +- Replace `archetypeVersion` with the latest toolchain version +- Specify `type` to be either `abx` (vRA ABX Actions) or `vro` (vRO Polyglot Actions). + +```bash +#vRO: +mvn archetype:generate \ + -DinteractiveMode=false \ + -DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes \ + -DarchetypeArtifactId=package-polyglot-archetype \ + -DarchetypeVersion={LATEST_VERSION} \ + -DgroupId=com.vmware.pscoe \ + -DartifactId=testvronew \ + -Dtype=vro + +#ABX: +mvn archetype:generate \ + -DinteractiveMode=false \ + -DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes \ + -DarchetypeArtifactId=package-polyglot-archetype \ + -DarchetypeVersion={LATEST_VERSION} \ + -DgroupId=com.vmware.pscoe \ + -DartifactId=testabxnew \ + -Dtype=abx +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Project Structure.md b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Project Structure.md new file mode 100644 index 000000000..05675b283 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Project Structure.md @@ -0,0 +1,55 @@ +# Project Structure + +## Overview + +The polyglot archetype supports multiple actions in the src folder. Each has it's own structure depending on the type of the package. + +## Table Of Contents + +- [General](#general) +- [Templates](#templates) + - [NodeJS](#nodejs) + - [Python](#python) + - [Powershell](#powershell) + +### General + +- `polyglot.json` - marks a folder as a polyglot package. Contains information about the package. + - If the `platform.action` is set to `auto` the name of the folder will be used as the package name. + - If the `platform.protocolType` is set to one of possible values `'Ssl3' | 'Tls' | 'Tls11' | 'Tls12' | 'Tls13'` all external modules(Added through Import-Module in the code) will be downloaded using the selected encryption protcol, otherwise the system default is used. + +### Templates + +There are three templates: + +- src/template-nodejs ([NodeJs](#nodejs)) +- src/template-powershell ([Powershell](#powershell)) +- src/template-python ([Python](#python)) + +Note: you do not need to delete template folders. Any folder starting with `template-` is ignored. + +#### NodeJS + +- `handler.ts` - holds all the logic for the action +- `tsconfig.json` - used by typescript to compile the code during `mvn package`, since rootDirs and srcDirs are dynamic, there are placeholders in this file. **do not modify** + +> Dependencies +> +> NodeJS' dependencies are defined in the `package.json` file in the `dependencies` property. Specify only dependencies to your code, there are no mandatory dependencies as well as no default ones. + +#### Python + +- `handler.py` - holds all the logic for the action +- `requirements.txt` - holds dependency information e.g. requirements.txt: + + ```python + requests==2.23.0 + ``` + +> Dependencies +> +> These follow the standard python `requirements.txt` structure. No default or mandatory dependencies. [More Info](https://learnpython.com/blog/python-requirements-file/) + +#### Powershell + +- `handler.ps1` - holds all the logic for the action diff --git a/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Troubleshooting.md b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Troubleshooting.md new file mode 100644 index 000000000..0a4a1971c --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Troubleshooting.md @@ -0,0 +1 @@ +[//]: # (Finish with some troubleshooting tips, when any error are encountered and fixed for future issues) diff --git a/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Usage.md b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Usage.md new file mode 100644 index 000000000..aec52d8ab --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/General/Usage.md @@ -0,0 +1,15 @@ +# Usage + +## Overview + +Polyglot archetype just like any other archetype utilizes the `vrealize:push` to package and deploy the artifacts. + +## Table Of Contents + +1. [Command](#command) + +### Command + +```bash +mvn clean package vrealize:push -Penvironment_profile +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/Polyglot/README.md b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/README.md new file mode 100644 index 000000000..474fdd5b0 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/Polyglot/README.md @@ -0,0 +1,15 @@ +# Polyglot + +The polyglot archetype is an archetype that allows you to push "polyglot" actions to vRO and vRA (like powershell, python, nodejs). + +## Overview + +The polyglot archetype is used to push multiple of these actions at the same time in a single package. + +## Navigation + +- Getting Started + - [Project Structure](./General/Project%20Structure.md) + - [New Project](./General/New%20Project.md) +- [Usage](./General/Usage.md) +- [Troubleshooting](./General/Troubleshooting.md) diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Actions.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Actions.md new file mode 100644 index 000000000..dae3f433b --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Actions.md @@ -0,0 +1,103 @@ +# Actions + +vRO Actions, supported types, and how to use them inside the Typescript Archetype. + +## Overview + +vRO Actions can essentially be viewed as javascript modules that can be used inside workflows and other actions. This +is where classes, functions, objects, etc. are defined. + +## Table Of Contents + +1. [Pushing Actions](#pushing-actions) +2. [Action Parameters](#action-parameters) +3. [Action Return Type](#action-return-type) +4. [Examples](#examples) + +### Pushing Actions + +Actions are pushed when running `mvn clean package vrealize:push`. + +#### Limitations + +- Only actions that are under `PROJECT_ROOT/src` will be pushed to vRO. +- Only actions that end in `.js` and `.ts` will be pushed. +- Action name can contain only letters, numbers and the symbols "_" and "$". +- Action name cannot start with a number. + +### Action Parameters + +Action Parameters are **NOT** mandatory, but they will be taken into consideration if passed. + +JSDoc Parameters in vRO native actions are used when you want to define the parameter type. It will be taken into consideration, otherwise it will be Any. You must follow the way parameter types are defined in vRO. The argument name must match the regex: `^[a-zA-Z0-9_$]+$`. If it does not match, the parameter is ignored + +If the action is a typescript one, then typescript hints will be used instead. + +#### Action parameter description + +You can define descriptions per parameter by adding a `-`. + +Example: + +```javascript +/** + * @param {Any} arugment - This is the description + */ +``` + +#### Action parameters with properties + +You can define action parameters with properties like: + +```javascript +/** + * @param {Any} args + * @param {string} args.url + */ +(function (args) { + return args.url; +}) +``` + +In this example, the args.url will be ignored. + +[JSDoc documentation](https://jsdoc.app/tags-param.html#parameters-with-properties) + +#### Unsupported Parameters + +- Optional `@param {string} [optional=123]` or `@param {string=} optional` +- Union type `@param {(string|string[])} union` +- Repeated parameter `@param {...number} num` + +### Action Return Type + +Action return type is **NOT** mandatory, but it will be taken into consideration if passed. + +You can add `@return` or `@returns` to define the return type of the action, or alternatively if the action is typescript, +the typescript hints will be used. + +### Examples + +#### Native vRO Action + +```javascript +/** + * @param {Any} args + * @param {number} test + */ +(function (args, test, willBeAnyType) { + return args.url; +}); + +//...... + +// Will be transpiled to +return args.url; +``` + +In this example: + +- Param `args` of type Any +- Param `test` of type number +- Param `willBeAnyType` of type Any +- Return type: Any diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Config.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Config.md new file mode 100644 index 000000000..3770216ab --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Config.md @@ -0,0 +1,152 @@ +# Config elements + +vRO Configuration Elements and how to define them in a typescript project + +## Overview + +Configuration Elements are vRO constructs that allow you to store configuration data. Build Tools for VMware Aria supports a few ways of defining configuration elements as well as different types of values. + +## Table Of Contents + +- [Pushing Configuration Values](#pushing-configuration-values) +- [Secure Strings](#secure-strings) +- [CompositeTypes](#compositetypes) +- [Examples](#examples) + +### Pushing Configuration Values + +When doing `mvn clean package vrealize:push` you need to include some extra arguments if you want to push configuration values + +- `-Dvro.packageImportConfigurationAttributeValues=true` - Pushes all configuration values besides SecureStrings. +- `-Dvro.packageImportConfigSecureStringAttributeValues=true` - Pushes all Secure String configuration values. + +### Secure Strings + +Up to version 2.23.0 + +Secure strings in configuration elements are defined as shown below: + +```ts +import { Configuration } from "vrotsc-annotations"; + +@Configuration({ + name: "Test", + path: "PSCoE/Test", + attributes: { + password: + { + type: "SecureString", + value: "36BJ62U35V34T31R64I31H38Q39L2DH62K37Q63T61M2DK34O62R66K35U2DY38Y32S66Q35G2DQ63K66U64Z62X33Q37T31R34Q37W31Z66M31K", + description: "some number" + } + } +}) +export class Test { + password: SecureString; +} +``` + +When pushing them to vRO, you have to add `-Dvro.packageImportConfigSecureStringAttributeValues=true` to indicate to the Build Tools for VMware Aria that the SecureStrings should be imported as well. + +The value is encoded, and the best way to know what to set there would be to manually add it to vRO, then fetch it using the VSCode vRDT /vRealize Developer tools/ plugin by clicking on the extension in the sidebar and navigating to it. After you find it you will be able to extract the value from the retrieved `xml` and put it here. + +### CompositeTypes + +Currently, composite types are implemented for both vRO7 and vRO8. vRO8 is compatible with the old vRO7 way of importing composite types, so that format is used to import composite types in both systems. + +Composite types conform to these constraints: + +```ts +type PossibleAttributeValues = string | boolean | number; + +type AttributeValue = PossibleAttributeValues | PossibleAttributeValues[]; +``` + +Meaning that a Composite type can be a string, boolean, number or an array of each. + +### Examples + +Example Typescript Configuration Element: + +```ts +import { Configuration } from "vrotsc-annotations"; + +@Configuration({ + name: "GeneralConfig", + path: "PSCoE/MyProject", + attributes: { + composite: { + type: "CompositeType(field1:number,field2:boolean,field3:string,field4:Array/string):ITest", + value: { + field1: 1, + field2: true, + field3: '2222', + field4: ['test',"test2", `test3`] + }, + description: "A composite value with all the basics" + }, + numericAttr: { + type: "number", + value: 123, + description: "Represents a numeric variable" + }, + stringAttr: { + type: "string", + value: "Some String", + description: "A string variable" + }, + stringArray: { + type: "Array/string", + value: ["first", "second"], + description: "This is an array of strings" + }, + host: { + type: "REST:RESTHost", + description: "A RESTHost without any value ( placeholder )" + // Does not support values + }, + vm: { + type: "VC:VirtualMachine", + description: "A VirtualMachine without any value ( placeholder )" + // Does not support values + }, + password: { + type: "SecureString", + value: "36BJ62U35V34T31R64I31H38Q39L2DH62K37Q63T61M2DK34O62R66K35U2DY38Y32S66Q35G2DQ63K66U64Z62X33Q37T31R34Q37W31Z66M31K", + description: "some number" + } + } +}) +export class CompositeValuesTest { +} +``` + +Example YAML configuration element + +```yaml +name: CompositeConfigYaml +path: PSCoE/MyProject +attributes: + field1: + type: CompositeType(field1:number,field2:boolean,field3:string,field4:Array/string):ITest + description: "A composite type with primitives" + value: + field1: 1 + field2: true + field3: Test + field4: + - test1 + - test2 + - test3 + field2: + type: number + value: 123 + description: "Some number" + field3: + type: boolean + value: true + description: "Some boolean" + field4: + type: string + description: "Some string" +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Policy.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Policy.md new file mode 100644 index 000000000..602658c18 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Policy.md @@ -0,0 +1,327 @@ +# Policies + +vRO Policies and how to define them in Aria Orchestrator + +## Overview + +Aria Orchestrator supports creating Policies with different elements and variables. + +## Table of Contents + +1. [Policy Template Versioning](#policy-template-versioning) +2. [Example Policy](#example-policy) +3. [Naming Convention](#naming-convention) +4. [Creating Variables in Policy](#creating-a-variable-in-policy) +5. [Creating Elements to a Policy](#creating-elements-to-a-policy) + +### Policy Template Versioning + +Policy template now has two versions for backward compatability. Template versions can be changed using the **templateVersion** attribute. Use v2 for full support of creating Policy with variables and multiple elements. + +**NOTE:** templateVersion attribute is optional. if not provided, templateVersion will be considered as v1 by default. + +```ts +import { PolicyTemplate } from "vrotsc-annotations"; + +@PolicyTemplate({ + name: "Sample Policy", + path: "MyOrg/MyProject", + description: "Some Description", + templateVersion: "v2", // or v1 +}) +``` + +### Example Policy + +A Example typescript policy with all posible configurations for Policy Template Version 2 (v2). + +#### Version 1 + +```ts +import { PolicyTemplate } from "vrotsc-annotations"; + +@PolicyTemplate({ + name: "Policy Template Amqp", + path: "MyOrg/MyProject", + type: "AMQP:Subscription", +}) +export class PolicyTemplateAmqp { + onMessage(self: AMQPSubscription, event: any) { + System.log("onMessage"); + } +} +``` + +#### Version 2 + +```ts +import { PolicyTemplate } from "vrotsc-annotations"; + +@PolicyTemplate({ + name: "Sample Policy", + path: "MyOrg/MyProject", + description: "Some Description", + templateVersion: "v2", + variables: { + sample: { + type: "string", + value: "a string value with type mentioned", + description: "A variable created with type and description" + }, + config: { + type: "Properties", + configId: "8e2d3ba0-4e2c-4d4c-ad82-76de4967bf9f", + configKey: "props", + description: "A variable created with configuration binding" + }, + sample2: "a direct string value" + }, + elements: { + ElementOne: { + type: "AMQP:Subscription", + events: { + onMessage: "onMessage" + } + }, + ElementTwo: { + type: "SNMP:SnmpDevice", + events: { + OnTrap: { + workflowId: "56652d1b-f797-3e1c-a108-7db9ddfb1f42", + bindings: { + workflowInputOne: { + type: "string", + variable: "sample" + } + } + } + } + } + ElementThree: { + type: "Periodic Event", + schedule: { + periode: "every-minutes", + when: "13,15", + timezone: "Asia/Calcutta" + } + } + } +}) +``` + +### Naming Convention + +Naming convention for creating variables, elements with different types of elements and events. + +```ts +import { PolicyTemplate } from "vrotsc-annotations"; + +@PolicyTemplate({ + name: "Sample Policy", + path: "MyOrg/MyProject", + description: "Some Description", + templateVersion: "v2", // Policy Template Version: v1 or v2 + variables: { + sample: { // variable name + type: "string", // variable type + value: "a string value with type mentioned", // variable value + description: "A variable created with type and description" // variable description + }, + config: { // variable name + type: "Properties", // variable type + configId: "8e2d3ba0-4e2c-4d4c-ad82-76de4967bf9f", // configuration element ID + configKey: "props", // configuration element key + description: "A variable created with configuration binding" // variable description + }, + sample2: "a direct string value" // directly assiged string value to a variable + }, + elements: { + // Policy with script for event + ElementOne: { // Policy element name + type: "AMQP:Subscription", // policy element type + events: { // list of events for element + onMessage: "onMessage" // event : method name in class + } + }, + // Policy with workflow execution + ElementTwo: { // Policy element name + type: "SNMP:SnmpDevice", // Policy element type + events: { // list of events for element + OnTrap: { // event name + workflowId: "56652d1b-f797-3e1c-a108-7db9ddfb1f42", // workflow id to execute + bindings: { // workflow input bindings + workflowInputOne: { // workflow input name + type: "string", // workflow input type + variable: "sample" // variable name for workflow input + } + } + } + } + }, + // Policy with Periodic Event + ElementThree: { // Policy element name + type: "Periodic Event", // Policy element type + schedule: { // Periodic event schedule - mandatory for periodic event + periode: "every-minutes", // period of schedule + when: "13,15", // time for schedule, can be multiple + timezone: "Asia/Calcutta" // timezone for schedule + } + } + } +}) +``` + +### Creating a Variable in Policy + +Variables can be created in a policy by adding them under **variables** attribute as shown in the example. + +#### Creating a String variable + +String variables can be added by directly assigning values to the them. + +```ts +variables: { + sample2: "a direct string value" +} +``` + +#### Creating Variables with other data types + +Other data type variables can be added by providing the additional information to them. + +```ts +variables: { + sample: { + type: "boolean", + value: true, + description: "A variable created with type and description" + }, + sample2:{ + type: "number", + value: 2, + description: "A Numeric value" + } +} +``` + +#### Creating Variables with Configuration binding + +Variables can be binded to configurations by providing configuration ID and key. + +```ts +variables: { + config: { + type: "Properties", + configId: "8e2d3ba0-4e2c-4d4c-ad82-76de4967bf9f", + configKey: "props", + description: "A variable created with configuration binding" + } +} +``` + +**Note:** Configuration binding will be considered if both value and configuration ID are provided to a variable. + +### Creating Elements to a Policy + +Elements can be created in a policy by adding them under **elements** attribute as shown in example + +#### Supported Element types + +- AMQP:Subscription +- MQTT:Subscription +- SNMP:SnmpDevice +- SNMP:TrapHost +- Periodic Event + +#### Creating a Periodic Event Element with defined event Method + +Periodic Event element can be added by providing the list of events and schedules as below. Schedules are mandatory for Periodic Event type elements + +```ts +elements: { + PeriodicEvent: { + type: "Periodic Event", + events:{ + OnExecute: "onExecuteEvent" + }, + schedule: { + periode: "every-minutes", + when: "13,15", + timezone: "Asia/Calcutta" + } + } +} + +export class SamplePolicy { + onExecuteEvent(self: AMQPSubscription, event: any) { + let message = self.retrieveMessage(event); + System.log(`Received message ${message.bodyAsText}`); + } +} +``` + +#### Creating a Periodic Event Element with bound event Method + +Events can either be a method defined in the typescipt Policy or can be bound to a workflow. + +```ts +elements: { + PeriodicEvent: { + type: "Periodic Event", + events:{ + OnExecute: { + workflowId: "56652d1b-f797-3e1c-a108-7db9ddfb1f42", + bindings: { + workflowInputOne: { + type: "string", + variable: "sample" + } + } + } + }, + schedule: { + periode: "every-minutes", + when: "13,15", + timezone: "Asia/Calcutta" + } + } +} +``` + +From the above example, the workflow ID and its input bindings are provided. The inputs are binded to variables created in the policy. + +#### Creating Other Element Types + +Other supported element types can be as below. Events can be a method defined in the policy or can be binded to a workflow. + +```ts +elements: { + ElementOne: { + type: "AMQP:Subscription", + events: { + onMessage: "onMessage" + } + }, + ElementTwo: { + type: "SNMP:SnmpDevice", + events: { + OnTrap: { + workflowId: "56652d1b-f797-3e1c-a108-7db9ddfb1f42", + bindings: { + sourceGroup: { + type: "string", + variable: "sample" + } + } + } + } + } +} + +export class SamplePolicy { + onMessage(self: AMQPSubscription, event: any) { + let message = self.retrieveMessage(event); + System.log(`Received message ${message.bodyAsText}`); + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Workflows.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Workflows.md new file mode 100644 index 000000000..d53c8d2f3 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Components/Workflows.md @@ -0,0 +1,368 @@ +# Workflows + +How to use Aria Orchestrator Workflows and available decorators. + +## Overview + +## Table of Contents + +1. [Argument Decorators](#argument-decorators) +2. [Workflow Decorators](#workflow-decorators) +3. [Available Method Decorators](#available-method-decorators) + - [`@Item`](#item) + - [`@WaitingTimerItem`](#waitingtimeritem) + - [`@DecisionItem`](#decisionitem) + - [`@RootItem`](#rootitem) + - [`@DefaultErrorHandler`](#defaulterrorhandler) + - [`@WorkflowEndItem`](#workflowenditem) +4. [Example Workflow](#example-workflow) + +### Argument Decorators + +- `@In` - Used to bind an input to a function. +- `@Out` - Used to bind an output to a function. +- `@Err` - Used to bind an error to a function. + +### Workflow Decorators + +Not implemented yet. + +#### `@DefaultErrorHandler` + +This decorator is used to specify a default error handler. It can be bound either to a workflow item component or workflow end. + +#### Supported Parameters + +- `target` - target item to be attached to the default error handler, could be one of workflow item or workflow end. +- `exceptionVariable` - Exception variable that will hold the exception data when triggered. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +Example: + +```typescript +import { + Workflow, + RootItem, + In, + Out, + Item, + DefaultErrorHandler, + WorkflowEndItem, +} from "vrotsc-annotations"; + +@Workflow({ + name: "Default Error Handler Custom Item", + path: "VMware/PSCoE", + description: + "Default error handler workflow with error handler redirecting to a workflow item", + attributes: { + errorMessage: { + type: "string", + }, + }, +}) +export class HandleDefaultError { + @RootItem() + public initiateWorkflow() { + System.log("Initiating workflow execution"); + } + + @Item({ + target: "workflowEnd", + }) + public processError(@In errorMessage: string) { + System.log( + `Processing error using custom task with message '${errorMessage}'` + ); + } + + @DefaultErrorHandler({ + exceptionVariable: "errorMessage", + target: "processError", + }) + public defaultErrorHandler(@Out errorMessage: string) { + // NOOP + } + + @WorkflowEndItem({ + endMode: 0, + exceptionVariable: "errorMessage", + }) + public workflowEnd(@Out errorMessage: string) { + System.log(`Terminating workflow with error ${errorMessage}`); + } +} +``` + +### Available Method Decorators + +#### `@WorkflowEndItem` + +The decorator is used to specify a custom workflow end item. + +##### Supported Parameters + +- `endMode` - End mode of the component, could be one of 0 or 1, where 0 is exit success and 1 is error. +- `exceptionVariable` - Exception variable that will hold the exception data when triggered. +- `businessStatus` - Value of the business status in the end component. + +#### `@Item` + +This decorator is used to specify a scriptable task. + +##### Supported Parameters + +- `target` - The name of the next in line item. If this is set to `end`, it will point to the end of the workflow. If this is set to `null`, it will point to the next item or if none, the end of the wf. If this is set to a string, but it does not exist in the workflow, it will point to the end of the wf. +- `exception` - **Not implemented yet** + +#### `@WaitingTimerItem` + +This decorator is used to specify a waiting timer. + +##### Supported Parameters + +- `target` - The name of the next in line item. Same as `@Item`. This decorator expects an `@In` parameter with the name of the waiting timer. If one isn't added, the workflow will not work. + +#### `@DecisionItem` + +This decorator is used to specify a decision item. + +##### Supported Parameters + +- `target` - The name of the next in line item. Same as `@Item`. +- `else` - The name of the next in line item if the decision is false. If this is set to `end`, it will point to the end of the workflow. If this is set to `null`, it will point to the next item or if none, the end of the wf. If this is set to a string, but it does not exist in the workflow, it will point to the end of the wf. + +#### `@WorkflowItem` + +The decorator is used to specify a workflow item that will be called. + +##### Supported Parameters + +- `target` - The name of the next in line item. Same as `@Item`. +- `linkedItem` - The ID of the workflow to call. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +#### `@ScheduledWorkflowItem` + +The decorator is used to specify a scheduled workflow item that will be called. + +##### Supported Parameters + +- `target` - The name of the next in line item. Same as `@Item`. +- `linkedItem` - The ID of the workflow to schedule. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +##### Inputs + +Special input is needed for the ScheduledWorkflowItem. + +- `workflowScheduleDate` - {Date} is required. The name **must** be `workflowScheduleDate`. If this is missing an error is thrown. We don't check if the type is `Date` but Aria Orchestrator will complain. + +##### Outputs + +Special output is needed for the ScheduledWorkflowItem. + +- `scheduledTask` - {Task} is optional. If it's missing nothing will happen, if it's added, then the name **must** be `scheduledTask`. This is the task that is scheduled. + +#### `@RootItem` + +This is a meta decorator. Add this to whichever function you want to be the entry point of the workflow. + + +#### `@AsyncWorkflowItem` + +##### Supported Parameters + +- `@AsyncWorkflowItem({target: "", linkedItem: "" })` + - `target` - The name of the next in line item. + - `linkedItem` - The ID of the workflow to call + + +##### Outputs + +Special output is needed for the AsyncWorkflowItem. + +- `wfToken` - {WorkflowToken} is required. The name **must** be `wfToken`. If this is missing an error is thrown. We don't check if the type is `WorkflowToken` but Aria Orchestrator will complain. + +##### Inputs + +No special inputs are needed for the AsyncWorkflowItem. + +#### `@ActionItem` + +##### Supported Parameters + +- `@ActionItem({target: "", scriptModule: "" })` + - `target` - The name of the next in line item. Same as `@Item`. + - `scriptModule` - The path of the action you want to call and the action name, separated by `/`. Example: `com.vmware.pscoe.library.general/echo`. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +##### Outputs + +There is a requirement to have only one output, and it will be of type `ActionResult`. + + +### Example Workflow + +```ts +import { + Workflow, + Out, + In, + Item, + RootItem, + DecisionItem, + WaitingTimerItem, + WorkflowItem, + WorkflowEndItem, + ScheduledWorkflowItem +} from "vrotsc-annotations"; + +@Workflow({ + name: "Example Waiting Timer", + path: "VMware/PSCoE", + attributes: { + waitingTimer: { + type: "Date", + }, + counter: { + type: "number", + }, + first: { + type: "number", + }, + second: { + type: "number", + }, + result: { + type: "number", + }, + workflowScheduleDate: { + type: "Date" + }, + scheduledTask: { + type: "Task" + } + errorMessage: { + type: "string", + }, + wfToken: { + type: "WorkflowToken" + }, + actionResult: { + type: "ActionResult" + } + }, +}) +export class HandleNetworkConfigurationBackup { + @DecisionItem({ target: "waitForEvent", else: "prepareItems" }) + public decisionElement(waitingTimer: Date) { + return waitingTimer !== null; + } + + @Item({ target: "callOtherWf" }) + public prepareItems(@In @Out first: number, @In @Out second: number, @In @Out workflowScheduleDate: Date) { + first = 1; + second = 2; + workflowScheduleDate = System.getDate("1 minute from now", undefined); + } + + @WorkflowItem({ + target: "print", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0", + }) + public callOtherWf( + @In first: number, + @In second: number, + @Out result: number + ) { + // NOOP + } + + + @Item({ target: "scheduleOtherWf" }) + public print(@In result: number) { + System.log("Result: " + result); + } + + @ScheduledWorkflowItem({ + target: "printScheduledDetails", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" + }) + public scheduleOtherWf(@In first: number, @In second: number, @In workflowScheduleDate: Date, @Out scheduledTask: Task) { + } + + @Item({ target: "asyncCall" }) + public printScheduledDetails(@In scheduledTask: Task) { + System.log(`Scheduled task: ${scheduledTask.id}, [${scheduledTask.state}]`); + } + + + @AsyncWorkflowItem({ + target: "printAsync", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" + }) + public asyncCall(@In first: number, @In second: number, @Out wfToken: WorkflowToken) { + } + + @Item({ target: "printActionResult" }) + public printAsync(@In wfToken: WorkflowToken) { + System.log(`Workflow token: ${wfToken.id} and state: ${wfToken.state}`); + } + + @ActionItem({ + target: "printActionResult", + scriptModule: "com.vmware.pscoe.onboarding.sgenov.actions/test" + }) + public callTestAction(@In first: number, @In second: number, @Out actionResult: ActionResult) { + } + + @Item({ target: "end" }) + public printActionResult(@In actionResult: ActionResult) { + System.log(`Action result: ${actionResult.getResult()}`); + } + + + @Item({ target: "decisionElement", exception: "" }) + public execute(@Out @In waitingTimer: Date, @Out @In counter: number): void { + if (!counter) { + counter = 0; + } + + counter++; + if (counter < 2) { + const tt = Date.now() + 5 * 1000; + waitingTimer = new Date(tt); + } else { + waitingTimer = null; + } + + System.log("Counter: " + counter); + System.log("Waiting Timer: " + waitingTimer); + } + + @Item({ target: "execute", exception: "" }) + @RootItem() + public start() { + System.log("Starting workflow"); + } + + @WaitingTimerItem({ target: "execute" }) + public waitForEvent(@In waitingTimer: Date) { + // NOOP + } + + @WorkflowEndItem({ + endMode: 0, + exception: "errorMessage", + businessStatus: "Bad", + }) + public workflowEnd() { + // NOOP + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Core Concepts.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Core Concepts.md new file mode 100644 index 000000000..69df68c24 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Core Concepts.md @@ -0,0 +1,30 @@ +[//]: # (DEFAULT TEMPLATE, Used if no others match) + +[//]: # (Remove Comments when you are done) +[//]: # (What is this?) + +# Title + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous:) + +[//]: # (Optional Section) +[//]: # (## Next:) diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Getting Started.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Getting Started.md new file mode 100644 index 000000000..ecd8bbe2a --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Getting Started.md @@ -0,0 +1,32 @@ +[//]: # (DEFAULT TEMPLATE, Used if no others match) + +[//]: # (Remove Comments when you are done) +[//]: # (What is this?) + +# Title + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Table Of Contents + +1. [Properties](#properties) + +### Properties + +#### skipInstallNodeDeps + +Add the `skipInstallNodeDeps` flag to skip the deletion and re-installation of node-deps. Ex: `mvn clean package -DskipInstallNodeDeps=true`. + +Note: If node_modules folder doesn't exist, then this flag is ineffective. + +#### -Dvro.forceImportLatestVersions + +This strategy will force you to upload the same or newer version of a package, otherwise it will fail the build, allowing us for better CI/CD pipelines, where we can ensure that the latest versions are always used on the server. diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Known Issues.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Known Issues.md new file mode 100644 index 000000000..27e64d851 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Known Issues.md @@ -0,0 +1,118 @@ +# Known Issues + +A list of known typescript archetype issues. + +## Table Of Contents + +1. [Array functions are not transpiled to vRO code](#array-functions-are-not-transpiled-to-vro-code) + +### Array functions are not transpiled to vRO code + +If an `Array` variable is not explicitly defined or recognized as such, the transpiler does not convert the TS-specific `Array` prototype functions (`find()`, `some()`, etc.) into vRO compatible code which results in a runtime error. + +Consider the following example: + +```javascript +const testArray = [1, 2, 3, 4, 5]; + +let objectsForIteration = null; +if (true) { + objectsForIteration = testArray; +} + +// Fails to transpile correctly because type is resolved to "any" +const res = objectsForIteration.find(o => o === 2) +System.log(res + "") +``` + +The code above is be converted to the following vRO code, which during execution throws the error `TypeError: Cannot find function find in object 1,2,3,4,5.` + +```javascript +var testArray = [1, 2, 3, 4, 5]; + +var objectsForIteration = null; +if (true) { + objectsForIteration = testArray; +} + +// Fails to transpile correctly because type is resolved to "any" +var res = objectsForIteration.find(function (o) { return o === 2; }); +System.log(res + ""); +``` + +Proper variable typization solves this problem. Let's revisit the example but this time we will explicitly define the type of values that we expect the `objectsForIteration` variable to receive. + +```javascript +const testArray = [1, 2, 3, 4, 5]; + +let objectsForIteration: Array = null; +if (true) { + objectsForIteration = testArray; +} + +// Transpiles correctly because of explicit typization +const res = objectsForIteration.find(o => o === 2) +System.log(res + "") +``` + +The code is transpiled correctly to vRO code and executes successfully. + +```javascript +var __global = System.getContext() || (function () { + return this; +}).call(null); +var VROES = __global.__VROES || (__global.__VROES = System.getModule("com.vmware.pscoe.library.ecmascript").VROES()); +var testArray = [1, 2, 3, 4, 5]; + +var objectsForIteration = null; +if (true) { + objectsForIteration = testArray; +} +// Transpiles correctly because of explicit typization +var res = VROES.Shims.arrayFind(objectsForIteration, function (o) { return o === 2; }); +System.log(res + ""); +``` + +#### How to prevent this issue + +The recommended configuration to prevent such issues is to set the `strictNullChecks` property to `true` in your project's local `tsconfig.json` file. This allows for a type hint warning to be displayed in case the type is not explicitly defined. + +> **NOTE!** The warning messages received are optional and are NOT blocking package build and push operations. + +Let's revisit the example once again with `strictNullChecks` enabled: + +```javascript +const testArray = [1, 2, 3, 4, 5]; + +let objectsForIteration = null; +if (true) { + // The following warning message is displayed: Type 'number[]' is not assignable to type 'null'.ts(2322) + objectsForIteration = testArray; +} + +// The following warning message is displayed: 'objectsForIteration' is possibly 'null'.ts(18047) +const res = objectsForIteration.find(o => o === 2) +System.log(res + "") +``` + +Sample `tsconfig.json`: + +```javascript +{ + "compilerOptions": { + "target": "ES5", + "module": "CommonJS", + "moduleResolution": "Node", + "lib": [ + "ES5", + "ES2015.Core", + "ES2015.Collection", + "ES2015.Iterable", + "ES2015.Promise", + "ES2017.String" + ], + "experimentalDecorators": true, + "strictNullChecks": true + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Code Coverage.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Code Coverage.md new file mode 100644 index 000000000..b75212271 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Code Coverage.md @@ -0,0 +1,123 @@ +# Code Coverage + +Details on how to enable, configure and read code coverage + +## Overview + +After code has been compiled to javascript (from typescript), a testbed is created. A VRO Runtime is inserted so you can use some modules natively (things like Workflow, Properties, LockingSystem, Server, System, etc.). After the test bed is created, jasmine is run either through IstanbulJS or directly (depending if code coverage is enabled or not). + +> **Jasmine version: 4.0.2** + +## Table Of Contents + +1. [Enabling Code Coverage](#enabling-code-coverage) +2. [Reporters](#reporters) +3. [Setting Thresholds](#setting-thresholds) +4. [How to exclude files from code coverage](#how-to-exclude-files-from-code-coverage) +5. [Best Practices](#best-practices) +6. [Limitations](#limitations) +7. [FAQ](#faq) + +### Enabling Code Coverage + +Start by Adding the following profile to your `~/.m2/settings.xml` file + +```xml + + pscoe-testing + + true + text,html,clover,cobertura,lcovonly + + +``` + +Activate the profile by adding it to the ``. + +```xml + + pscoe-testing + +``` + +### Reporters + +The toolchain supports many different code coverage reporters. Internally we use a tool called IstanbulJS, so the supported reporters and their documentation can be found here: [Using Alternative Reporters](https://istanbul.js.org/docs/advanced/alternative-reporters/). + +After enabling a reporter and running `mvn clean test`, you can see the output files in: `/target/vro-tests/coverage/` + +### Setting Thresholds + +When setting the thresholds for code coverage if you set the ``, if the percentage is not met when running the tests, the tests will be considered as failed. Including such thresholds into your CI/CD pipeline will introduce hard limits that developers must follow when writing code. This way you can introduce a very good quality gate. It is suggested to start with a lower threshold for older projects and higher threshold for new projects. A good example of setting an error threshold would be around 60-70 and a possible warning threshold in the 80s. + +Individual overwrites for thresholds can be set for branches, lines, functions and statements. These individually overwrite the default ones (`test.coverage.thrsholds.error|warn`). + +#### Per-file + +Code coverage per file bases. Set custom --coverage-thresholds, if any file in the project drops below those thresholds, the build will fail. + +Enable by setting `true` in your `~/.m2/settings.xml` testing profile. + +Refer to InstanbulJS documentation for more information: [https://github.com/istanbuljs/nyc](https://github.com/istanbuljs/nyc). + +```xml + + pscoe-testing + + true + text,html,clover,cobertura,lcovonly + + + 70 + 80 + + 60 + 70 + 60 + 70 + 60 + 70 + 60 + 70 + true + + +``` + +### How to exclude files from code coverage + +Files can be excluded from code coverage by naming them following the pattern: `*.helper.[tj]s`. + +During testing, you will be able to use these files by specifying them normally (`import testHelper from "./testHelper.helper";`). + +### Best Practices + +> **Naming convention** + +```txt +"**/?(*.)+(spec|test).[j|t]s(x)" + +//example names for javascript file +MyTests.test.js +MyTests.spec.js + +//example names for typescript file +MyTest.test.ts +MyTest.spec.ts +``` + +### Limitations + +> **actions-package** + +For actions-package projects, all test must be placed under `src/test` folder in order to be compiled and executed and packaged correctly. + +### FAQ + +#### Can I use Jasmine Helpers? + +Jasmine helpers are not supported. We are injecting the vRO Runtime with a helper tho. + +#### Can I test workflows? + +This is currently not supported. As a general rule of thumb, keep your Workflows as minimal as possible. Abstract the logic away from the workflows and put it in an Action that is easily testable. diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Dependecy Injection.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Dependecy Injection.md new file mode 100644 index 000000000..e33350e8b --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Dependecy Injection.md @@ -0,0 +1,88 @@ +# Dependecy Injection + +Example on how to test Dependency Injection + +## Overview + +Dependency injection is providing the objects that an object needs (its dependencies) instead of having it construct them itself. It's a very useful technique for testing, since it allows dependencies to be mocked or stubbed out. + +Dependencies can be injected into objects by constructor injection or setter injection. + +## Table Of Contents + +1. [Example](#example) + +### Example + +Test + +```typescript +export class NoDependencyInjection { + protected restHost: RESTHost; + + // We can retrieve the RESTHost from a config element, but we have no way of creating mocks/spies/expectations + init() { + const restHostConfig = new ConfigElementAccessor('ing/testing/dependencyInjectionRestHost'); + this.restHost = restHostConfig.get('restHost'); + } + + doApiCall() { + const request = this.restHost.createRequest("GET", "/ping", ""); + + return request.execute(); + } +} + +// To test this, create a mock for restHostConfig +export class SomeDependencyInjection { + private restHost: RESTHost; + + // Retrieve the RESTHost from a config element + constructor(restHostConfig: ConfigElementAccessor) { + this.restHost = restHostConfig.get('restHost'); + } + + doApiCall() { + const request = this.restHost.createRequest("GET", "/ping", ""); + + return request.execute(); + } +} + +// Even Better, we can test this by creating a mock for restHost directly, always delegate logic to the parent, not the child! +// Let the action/workflow that needs this class, fetch everything that is needed. +export class GoodDependencyInjection { + constructor(private restHost: RESTHost) { + } + + doApiCall() { + const request = this.restHost.createRequest("GET", "/ping", ""); + + return request.execute(); + } +} + +// Test oriented dependency injection. Useful in a LOT of cases. In your normal execution, you want to retrieve the value +// from some config element, but in test cases, you have an out +export class TestRelatedDependencyInjection { + // When we create this class in our workflows or actions, do not pass a parameter, but when writing tests, create a mocked restHost + constructor(private restHost?: RESTHost) { + if (!restHost) { + const restHostConfig = new ConfigElementAccessor('ing/testing/dependencyInjectionRestHost'); + this.restHost = restHostConfig.get('restHost'); + } + } + + doApiCall() { + const request = this.restHost.createRequest("GET", "/ping", ""); + + return request.execute(); + } +} + +export class NoDependencyInjectionTestDouble extends NoDependencyInjection { + // @ts-ignore + constructor(protected restHost: RESTHost) { + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Global-Classes.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Global-Classes.md new file mode 100644 index 000000000..c13b67170 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Global-Classes.md @@ -0,0 +1,52 @@ +# Global Classes + +Example on how to test global classes + +## Overview + +When it comes to Static Global Classes (like vCACCAFEFilterParam for example), they need to be defined before each test, with the methods that you want to use inside your test. + +## Table Of Contents + +1. [Example](#example) + +### Example + +Example Class: + +```typescript +export default function ( date: string): string { + Server.log( "Getting date" ); + return vCACCAFEFilterParam.date( date ); +} +``` + +Example test: + +```typescript +import testOne from "./testOne"; + +describe('', function () { + beforeEach(()=>{ + ( vCACCAFEFilterParam) = { + date: function ( date: string ) { + throw new Error( "Not Supported" ); + } + }; + }); + + afterEach(() => { + ( vCACCAFEFilterParam) = undefined; + }); + + it('should ', function () { + spyOn( Server, "log" ).and.callFake( () => {} ); + spyOn( vCACCAFEFilterParam, "date" ).and.returnValue( "spy" ); + + expect( testOne( 'test' ) ).toBe( "spy" ); + + expect( vCACCAFEFilterParam.date ).toHaveBeenCalledTimes( 1 ); + expect( Server.log ).toHaveBeenCalledTimes( 1 ); + }); +}); +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Native-Actions.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Native-Actions.md new file mode 100644 index 000000000..1025a88a3 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/Native-Actions.md @@ -0,0 +1,33 @@ +# Native Actions + +Example on how to test native actions + +## Overview + +When it comes to native actions items, using the old syntax of creating actions allow us to call the actions directly when needed. Mapping inputs and outputs according to the documentation/arguments. + +## Table Of Contents + +1. [Example](#example) + +### Example + +Test: + +```typescript +const sumAction = System.getModule("com.vmware.pscoe.actions").sumAction; + +describe("Sum Action test", () => { + it("should add two numbers", () => { + expect( sumAction( 1,5 ) ).toBe( 6 ); + }); +}) +``` + +Code To Test: + +```typescript +(function ( numberOne: number, numberTwo: number ):number { + return numberOne + numberTwo; +}); +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/RestHost.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/RestHost.md new file mode 100644 index 000000000..685be7bd1 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Examples/RestHost.md @@ -0,0 +1,51 @@ +# RestHost + +Example on how to test RestHost + +## Overview + +## Table Of Contents + +1. [Example](#example) + +### Example + +Test: + +```typescript +describe("ApiCall", () => { + it('should do an api call', function () { + const restHostTestDouble = jasmine.createSpyObj("RESTHost", ["createRequest"]); + const restRequestTestDouble = jasmine.createSpyObj("RESTRequest", ["execute"]); + const restResponseTestDouble = jasmine.createSpyObj("RESTResponse", [], {contentAsString: JSON.stringify({test: 2})}); + + restHostTestDouble.createRequest.and.returnValue(restRequestTestDouble); + restRequestTestDouble.execute.and.returnValue(restResponseTestDouble); + + const restHostExample = new RestHostExample(restHostTestDouble); + + const response = restHostExample.doApiCall(); + + expect(response.test).toBe(2); + expect(restHostTestDouble.createRequest).toHaveBeenCalledTimes(1); + expect(restHostTestDouble.createRequest).toHaveBeenCalledWith("GET", "/api/v1/test", ""); + expect(restRequestTestDouble.execute).toHaveBeenCalledTimes(1); + }); +}) + +``` + +Code To Test: + +```typescript +export default class RestHostExample { + constructor(private restHost: RESTHost) { + } + + doApiCall() { + const restRequest: RESTRequest = this.restHost.createRequest("GET", "/api/v1/test", ""); + const restResponse: RESTResponse = restRequest.execute() + return JSON.parse(restResponse.contentAsString); + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Getting Started.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Getting Started.md new file mode 100644 index 000000000..1f5343b0b --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Getting Started.md @@ -0,0 +1,85 @@ +# Getting Started + +## Overview + +After code has been compiled to javascript ( from typescript ), a testbed is created. A VRO Runtime is inserted so you can use some modules natively (things like Workflow, Properties, LockingSystem, Server, System, etc.). After the test bed is created, jasmine is run either through IstanbulJS or directly( depending if code coverage is enabled or not ). + +> **Jasmine version: 4.0.2** + +## Table Of Contents + +1. [Limitations](#limitations) +2. [Best Practices](#best-practices) +3. [FAQ](#faq) + +### Limitations + +> ***actions-package*** + +For actions-package projects, all test must be placed under `src/test` folder in order to be compiled and executed and packaged correctly. + +> ***What types of files can I test*** + +Only file types that can be tested are Actions - filename.ts. Workflows can't be tested as well as config files. As a general rule of thumb, keep your Workflows as minimal as possible. Abstract the logic away from the workflows and put it in an Action that is easily testable. + +### Best Practices + +> ***Unit testing*** + +Testing individual components of software. A unit test should test one thing. + +Label your test suites (describe blocks) and specs (it blocks) in a way that clearly conveys the intention of each unit test. Note that the name of each test is the title of its it preceded by all its parent describe names. Favor assertive verbs and avoid ones like "should." + +Test file contains one describe() block containing multiple describes with common functionality. Each describe() must have a meaningful name. Do not include logic or mocks in describe blocks. + +> ***beforeEach()*** + +We can execute some pieces of code before execution of each spec. For example you can create new instances here. Don't use any logic in the describe() block, only in beforeEach(). Use "this" to share variables between it and before/after blocks. + +```typescript +beforeEach(() => { + this.someClass = new SomeClass(); +}); + +describe("Different Methods of Expect Block",function() { + it("Returns even or optional ", function() { + expect(this.someClass.evenOrOdd()).toBe("even"); + }); +}); +``` + +> ***Write Minimum Passable Tests*** + +If appropriate, use Jasmine's built-in matchers (such as toContain, jasmine.any, jasmine.stringMatching, ...etc) to compare arguments and results. You can also create your own matcher via the asymmetricMatch function. + +```typescript +describe('Array.prototype', function() { + describe('.push(x)', function() { + beforeEach(function() { + this.initialArray = []; + + this.initialArray.push(1); + }); + + it('appends x to the Array', function() { + expect(this.initialArray).toContain(1); + }); + }); +}); +``` + +> ***Naming convention*** + +```txt +"**/?(*.)+(spec|test).[j|t]s(x)" + +//example names for javascript file +MyTests.test.js +MyTests.spec.js + +//example names for typescript file +MyTest.test.ts +MyTest.spec.ts +``` + +### FAQ diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Jasmine Spies.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Jasmine Spies.md new file mode 100644 index 000000000..1ab5a14f5 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Jasmine Spies.md @@ -0,0 +1,51 @@ +# Jasmine Spies + +## Overview + +A Spy is a feature that allows you to simulate the behavior of existing code and track calls to it back. It’s used to mock a function or an object. + +## Table Of Contents + +1. [createSpy()](#createspy) +2. [createSpyObj()](#createspyobj) + +### createSpy() + +Can be used when there is no function to spy on. Takes two arguments - name of the Service, method we want to mock + +```typescript +let testDouble = jasmine.createSpy("Name holder.", "method"); +``` + +### createSpyObj() + +createSpyObj() creates a mock object that will spy on one or more methods. It returns an object that has a property for each string that is a spy. It takes as first argument the name of a Service and as a second an array of strings of all the methods that we want to mock. + +```typescript +let testDouble = jasmine.createSpyObj("Name holder. Same as the type, in this case T", ["Array of strings with all functions that will be overwritten"]); +``` + +```typescript +describe("ApiCall", () => { + it('should do an api call', function () { + const restHostTestDouble = jasmine.createSpyObj("RESTHost", ["createRequest"]); + + const restRequestTestDouble = jasmine.createSpyObj("RESTRequest", ["execute"]); + + // Properties mock + const restResponseTestDouble = jasmine.createSpyObj("RESTResponse", [], {contentAsString: JSON.stringify({test: 2})}); + + restHostTestDouble.createRequest.and.returnValue(restRequestTestDouble); + restRequestTestDouble.execute.and.returnValue(restResponseTestDouble); + + const restHostExample = new RestHostExample(restHostTestDouble); + + const response = restHostExample.doApiCall(); + + expect(response.test).toBe(2); + expect(restHostTestDouble.createRequest).toHaveBeenCalledTimes(1); + expect(restHostTestDouble.createRequest).toHaveBeenCalledWith("GET", "/api/v1/test", ""); + expect(restRequestTestDouble.execute).toHaveBeenCalledTimes(1); + }); +}) +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Test Helpers.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Test Helpers.md new file mode 100644 index 000000000..698d15d94 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/General/Testing/Test Helpers.md @@ -0,0 +1,13 @@ +# Test Helpers + +## Overview + +Helpers are testing files. Naming convention is - filename.helper.ts . They are compiled, can be used in testing, no code coverage and will not be pushed to vRO. Mocks are defined in Helper files. + +## Table Of Contents + +1. [Known Issues](#known-issues) + +### Known Issues + +Helper files must be located in any folder under `src/`, recommended place is `src/tests/helpers`. diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Building.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Building.md new file mode 100644 index 000000000..69df68c24 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Building.md @@ -0,0 +1,30 @@ +[//]: # (DEFAULT TEMPLATE, Used if no others match) + +[//]: # (Remove Comments when you are done) +[//]: # (What is this?) + +# Title + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous:) + +[//]: # (Optional Section) +[//]: # (## Next:) diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Pushing.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Pushing.md new file mode 100644 index 000000000..69df68c24 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/Operations/Pushing.md @@ -0,0 +1,30 @@ +[//]: # (DEFAULT TEMPLATE, Used if no others match) + +[//]: # (Remove Comments when you are done) +[//]: # (What is this?) + +# Title + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous:) + +[//]: # (Optional Section) +[//]: # (## Next:) diff --git a/docs/versions/v2.41.0/Components/Archetypes/typescript/README.md b/docs/versions/v2.41.0/Components/Archetypes/typescript/README.md new file mode 100644 index 000000000..f08947010 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/typescript/README.md @@ -0,0 +1,24 @@ +# Typescript Archetype + +Typescript archetype used to compile and push typescript code to vRO. + +## Overview + +This archetype is used when you want to push code to vRO. It supports configuration elements, resource elements, workflows, +actions, policy templates, native content, types, etc. + +It allows you to write unit tests and has embedded code coverage + +## Navigation + +1. [Getting Started](General/Getting%20Started.md) +2. [Core Concepts](General/Core%20Concepts.md) +3. Operations + * [Building](Operations/Building.md) + * [Pushing](Operations/Pushing.md) +4. Components + * [Config](Components/Config.md) + * [Policies](Components/Policy.md) +5. Testing + * [Code Coverage](General/Testing/Code%20Coverage.md) +6. [Known Issues](General/Known%20Issues.md) diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Blueprints.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Blueprints.md new file mode 100644 index 000000000..ff9267cdd --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Blueprints.md @@ -0,0 +1,63 @@ +# Blueprints + +Blueprint (aka `Cloud Templates`) architects build Software components, machine blueprints, and custom XaaS blueprints and assemble those components into the blueprints that define the items users request from the catalog. + +## Table Of Contents + +1. [Structure](#structure) - how are blueprints exported and what does each file mean? +2. Operations + 1. [Importing](#importing) blueprints to vRA +3. [Known Issues](#known-issues) + +### Structure + +Below is an example structure of a blueprint export. + +Example `content.yaml` + +```yaml +blueprint: + - Example Blueprint +# ... +``` + +Structure + +```ascii +src/ +├─ main/ +│ ├─ resources/ +│ │ ├─ blueprints/ +│ │ │ ├─ Example Blueprint/ +│ │ │ │ ├─ content.yaml +│ │ │ │ ├─ details.json +│ │ │ │ ├─ versions.json +``` + +Each blueprint will be placed in a different folder. + +- `content.yaml` contains the exported code from the blueprint's canvas. +- `details.json` contains metadata information +- `versions.json` contains version information. Note that this is just the metadata, for now [the version history is not preserved](#version-history-gets-lost). + +### Importing + +When importing a blueprint, it is matched by its `name`. If there is a blueprint with the same name on the server, an update will be performed. Otherwise, the blueprint will be created instead. + +Also when importing an already existing blueprint, we will check for any differences between local copy and server copy. If there are differences, a new version will be released. New version is determined by the already existing versions. If a patter of MAJOR.MINOR.PATCH is detected, vRBT will try to continue the numbering, otherwise a date formatted version is released. + +#### Version Management + +By default all versions that are not the latest one will be unreleased. + +To control this behavior you can set: + +```xml +false +``` + +### Known Issues + +#### Version history gets lost + +This is known and currently there is no workaround for this. diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Content Policies.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Content Policies.md new file mode 100644 index 000000000..7f000b570 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Content Policies.md @@ -0,0 +1,200 @@ +# Content Policies + +There are 6 types of content policies: + +- Approval +- Content Sharing +- Day 2 Actions +- Deployment Limit +- Lease +- Resource Quota + +## Table Of Contents + +1. [Structure](#structure) +2. [Operations](#operations) + 1. [Exporting](#exporting) - how are policies exported from a vRa + 2. [Importing](#importing) importing policies to vRA +3. [Known Issues](#known-issues) + +### Structure + +Below is an example structure of content policies export. + +Example `content.yaml` + +```yaml +policy: + approval: + - example policy + content-sharing: + - example policy + day2-actions: + - example policy + deployment-limit: + - example policy + lease: + - example policy + resource-quota: + - example policy + +# ... +``` + +Structure + +```ascii +src/ +├─ main/ +│ ├─ resources/ +│ │ ├─ policies/ +│ │ │ ├─ approval/ +│ │ │ │ ├─ examplePolicy.json +│ │ │ ├─ content-sharing/ +│ │ │ │ ├─ examplePolicy.json +│ │ │ ├─ day2-actions/ +│ │ │ │ ├─ examplePolicy.json +│ │ │ ├─ deployment-limit/ +│ │ │ │ ├─ examplePolicy.json +│ │ │ ├─ lease/ +│ │ │ │ ├─ examplePolicy.json +│ │ │ ├─ resource-quota/ +│ │ │ │ ├─ examplePolicy.json +``` + +### Operations + +Operations are invoked on policies based on filtering from content.yml file, according to the following rules: + +- Empty array [] - nothing is imported/exported. +- List of items - the given items are imported/exported. If they are not present on the server an Exception is thrown. +- Null (nothing given) - everything is being imported/exported. + +#### Importing + +When importing policies, files are read form the filesystem, and the content.yml filter is by filename. All non-hidden files are read from the folder, and if the name of the file, without the extension matches the list in content.yml, the policy will be imported. The filename is only important for filtering. Actual policy fields are read from the file contents. If there is a policy with the same id on the server, an update will be performed. Otherwise, the policy will be created instead, using the same id, that is found in the file. + +##### Content Sharing Polices Import + +If project name is is defined as a *scope* proprty in the content sharing JSON file it will be used as a project scope during push , hence allowing more granular content sharing across different projects. If the *scope* property is not defined then the project id defined in the settings.xml configuration file will be used. + +If a organization name is defined as *organization* property in the content sharing JSON file then it will be used as organization of the content sharing policy, otherwise the organization defined in the settings.xml file will be used. The following policy types can be used during import: + +1. Content source policies. +2. Catalog item policies. +3. Combined policies (that contain catalog items and content sources). + +The name of the content source(s) and catalog item(s) in the file are stored in the JSON file, hence if they are present on the target system the policy can be imported correctly during subsequent push. + +#### Exporting + +When exporting a policy, a json file will be created on the filesystem. The filename will be the policyName[-index].json. +Index will be added only if there are multiple policies with the same name. + +##### Content Sharing Polices Export + +The scope and organization of the content sharing policy will be exported as *scope* and *organization* properties in the output JSON file(s). The project name will be used as as *scope* parameter and organization name will be used as a *organization* parameter. The following policy types can be created on the target system and they will be exported as well: + +1. Content source policies. +2. Catalog item policies. +3. Combined policies (that contain catalog items and content sources). + +The catalog items and content source policies will be stored with their names in the output JSON file. + +#### Content Sharing Polices Examples + +Example content sharing policy JSON file with scope / organization parameters. + +```JSON +{ + "id": "1", + "name": "contentSharingPolicy", + "typeId": "com.vmware.policy.catalog.entitlement", + "projectId": "1", + "scope": "projectId1", + "organization": "organization1", + "enforcementType": "HARD", + "description": "TEST", + "definition": { + "entitledUsers": [ + { + "items": [ + { + "name": "Content Source 1", + "type": "CATALOG_SOURCE_IDENTIFIER" + }, + { + "name": "Content Source 2", + "type": "CATALOG_SOURCE_IDENTIFIER" + }, + { + "name": "Catalog Item 1", + "type": "CATALOG_ITEM_IDENTIFIER" + }, + ], + "userType": "USER", + "principals": [ + { + "type": "PROJECT", + "referenceId": "" + } + ] + } + ] + } +} +``` + +Example content sharing policy JSON file without scope / organization parameters. + +```JSON +{ + "id": "1", + "name": "contentSharingPolicy", + "typeId": "com.vmware.policy.catalog.entitlement", + "projectId": "1", + "orgId": "1", + "enforcementType": "HARD", + "description": "TEST", + "definition": { + "entitledUsers": [ + { + "items": [ + { + "name": "Content Source 2", + "type": "CATALOG_SOURCE_IDENTIFIER" + }, + { + "name": "Content Source 3", + "type": "CATALOG_SOURCE_IDENTIFIER" + }, + { + "name": "Catalog Item 4", + "type": "CATALOG_ITEM_IDENTIFIER" + }, + ], + "userType": "USER", + "principals": [ + { + "type": "PROJECT", + "referenceId": "" + } + ] + } + ] + } +} +``` + +### Known Issues + +Re-Creating Deleted policy. +If you delete a policy, and then try to re-import it immediately, the import command will not fail, however, the policy will not be created. +After a certain delay, the policy can be re-created again via vrealize:push. +"Open bug: [VRAE-61849]" + +Here are two approaches to prevent this from happening: + +- **Do not delete policies before re-importing them.** This approach will only work if you do not need to change some properties like projectId. + +- **Remove policy ids from JSON files.** After successful import, do a export to get the new policyIds in the JSON files again. This approach will only work if you are exporting and importing from a single site. If you are exporting from SiteA to SiteB regularly, this may lead to policy duplicates. diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Custom Resources.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Custom Resources.md new file mode 100644 index 000000000..8d0dff59c --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Custom Resources.md @@ -0,0 +1,17 @@ +# Custom Resources + +They are items that can be used in the Blueprints/Cloud Templates when the existing Resource Types are not enough. + +## Overview + +Custom Resources are items that are defined inside of Cloud Assembly. They extend the capabilities of Cloud Templates by giving you the ability to define your own Resource, that calls either a vRO Workflow or an ABX Action (in the latest version of vRA). Custom Resources are defined in the `content.yaml` file under `custom-resource` ([See content.yaml](../General/Content.md)). + +## Table Of Contents + +1. [Known Issues](#known-issues) + +### Known Issues + +#### Updating A Custom Resource When In Use By Deployment + +When we try to update a CR that is in use by a deployment and if the deletion fails, now we will attempt to update the CR by pre-fetching it's ID. Once we have the ID, we would remove it from the CR and re-assigned it again before the importing process is initiated. This would allow us to create an updated CR that would be imported to vRA no matter if it is used by a deployment. However, update capabilities are limited and may not allow you to update all fields. diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Storage Profiles.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Storage Profiles.md new file mode 100644 index 000000000..653a6aeaf --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Components/Storage Profiles.md @@ -0,0 +1,46 @@ +# Storage Profiles + +They are items that can be used in the Blueprints/Cloud Templates to use different types of storage options. + +## Overview + +> **Finish** + +## Table Of Contents + +1. [Structure](#structure) - how are storage profiles exported and what is in the file? +2. Operations + 1. [Importing](#importing) storage profiles to vRA +3. [Known Issues](#known-issues) + +### Structure + +Below is an example structure of a storage-profile export. + +Example `content.yaml` + +```yaml +storage-profile: + - Example Storage Profile +# ... +``` + +Structure + +```txt +src/ +├─ main/ +│ ├─ resources/ +│ │ ├─ regions/ +│ │ │ ├─ example region name/ +│ │ │ │ ├─ storage-profiles/ +│ │ │ │ │ ├─ Example Storage Profile.json +``` + +`Example Storage Profile.json` contains disk metadata information. + +### Importing + +When importing a storage profile, it is matched by its `name`. If there is a storage profile with the same name on the server, an update will be performed. Otherwise, the storage profile will be created instead. Note that a Storage Profile has to contain the proper tags in the metadata json that also exist under the `region-mapping` section in `content.yaml` in order to do import and export. + +### Known Issues diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Content.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Content.md new file mode 100644 index 000000000..fabb8ecda --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Content.md @@ -0,0 +1,129 @@ + +# Content + +## Overview + +The vRA 8.x elements that you want to work with are described in the `content.yaml` + +## Table Of Contents + +1. [Content.yaml](#contentyaml) + +### Content.yaml + +By default the `content.yaml` looks like this. + +```yaml +blueprint: +subscription: +flavor-mapping: + - small + - medium +image-mapping: +storage-profile: +region-mapping: + cloud-account-tags: + export-tag: "env:dev" + import-tags: ["env:dev", "env:test"] +custom-resource: +resource-action: +catalog-entitlement: +catalog-item: +content-sources: +property-group: +``` + +#### Content Filtering + +Contents are exported by different rules. + +#### Import Rules for content types + +- Empty array [] - nothing is imported +- List of items - the given items are imported. If they are not present on the server an Exception is thrown. +- Null (nothing given) - everything is being imported + - blueprints + - catalog-item + - content-source + - custom-resource + - catalog-entitlement + - property-group + - subscription + - policies + +Importing regional content doesn't use the `content.yaml` when pushing content it is working as previously pushes whatever there is the package. + +#### Export Rules for content types + +- Empty array [] - nothing is exported +- List of items - the given items are exported. If they are not present on the server an Exception is thrown. +- Null (nothing given) - everything is being exported + - blueprints + - catalog-item + - content-source + - custom-resource + - catalog-entitlement + - property-group + - subscription + - policies + +#### Exporting regional content + +To export regional content, cloud account(s) with given tag(s) should be given. + +- Empty array [] - nothing is exported +- List of items - the given items are exported in all regions linked to cloud accounts with given tag. + + If they are added to the manifest, but not present on the server - they are skipped. + +- Null (nothing given) - everything is being exported in all regions linked to cloud accounts with given tag + - flavor-mapping + - image-mapping + - storage-profile + +#### Export all content in all regions linked to cloud accounts with given tag + +To export all content in all regions linked to cloud accounts, the tag for export should be defined. If not defined, nothing will be exported. + +#### Examples + +Example of `content.yaml` file. + +```yaml +blueprint: # will export all +subscription: # will export all +flavor-mapping: # only "small" and "meduim" will be exported in all regions linked to cloud accounts with given tag + - small + - medium +image-mapping: [] # nothing will be exported +storage-profile: [] # nothing will be exported +region-mapping: # export only items linked to cloud accounts with given tags + cloud-account-tags: + export-tag: "env:dev" + import-tags: ["env:dev", "env:test"] +catalog-item: # export according to filter + - Project Blueprints__WindowsVM + - Project Blueprints__LinuxVm + - Main Workflows__ConfigureVM +custom-resource: # will export all +resource-action: # will export all +property-group: # export according to filter + - memory +catalog-entitlement: # export according to filter + - Content source entitlement +content-source: # export according to filter + - Project Blueprints + - Main Workflows + - Utility Workflows + - Project Abx Actions + - Project Code Stream pipelines +policy: # export according to filter + approval: [] + content-sharing: + - cs policy 1 + - cs policy 2 + day2-actions: [] + deployment-limit: [] + lease: [] + resource-quota: [] +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Core Concepts.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Core Concepts.md new file mode 100644 index 000000000..839cd0169 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Core Concepts.md @@ -0,0 +1,93 @@ +# Core Concepts + +Laid out are some Core Concepts to follow when working with vRA 8.x ( vRA-NG ) archetype. + +## Overview + +vRA-NG archetype uses a pull and push approach to handling data. + +## Table Of Contents + +1. [Data Handling](#data-handling) +2. [ID handling](#id-handling) +3. [Single Project And Organization](#single-project-and-single-organization) +4. [Blueprint Versioning](#blueprint-versioning) + +### Data Handling + +All data that needs to be exported from vRA is defined in the `content.yaml` file ([read more here](Content.md)). The tool respects configuration in manifest when doing `vra-ng:pull` for the given objects: + +- blueprints +- catalog-item +- content-source +- custom-resource +- catalog-entitlement +- property-group +- subscription +- policies + - approval + - content-sharing + - day2-actions + - deployment-limit + - lease + - resource-quota + +It will throw an error if the given entities are not on the server. + +All the data exported will be imported when running `vrealize:push`! Keep in mind that the `content.yaml` will not be taken into consideration. + +### ID handling + +Relying on ids exported by Build Tools for VMware Aria should not happen. Build Tools for VMware Aria will remove where needed such ids or in some cases data will be fetched from the remote server, modified in flight and pushed to the server ( in cases where an import is needed ). + +### Single Project And Single Organization + +When working with vRA-NG archetype, each generated archetype is intended to work with **only one project and one organization**. In a case where more are needed, you must generate multiple archetypes. + +### Blueprint Versioning + +When pushing a blueprint to a vRA server that contains previously released blueprint with the same name as the one being pushed, a new version will be created and released in order to maintain the intended state. A new version will *not* be created if the content of the blueprint has not been modified since the latest released version in order to avoid unnecessary versioning. + +If there's a custom form associated with the blueprint being imported and there's no previously released version, an initial blueprint version (1) will be created and released in order to import the custom form. + +When creating a new version in the above-described cases, the new version will be auto-generated based on the latest version of the blueprint. The following version formats are supported with their respective incrementing rules: + +| Latest version | New version | Incrementing rules | +|----------------|---------------------|------------------------------------------------------------| +| 1 | 2 | Increment major version | +| 1.0 | 1.1 | Major and minor version - increment the minor | +| 1.0.0 | 1.0.1 | Major, minor and patch version - incrementing the patch | +| 1.0.0-alpha | 2020-05-27-10-10-43 | Arbitrary version - generate a new date-time based version | + +### Catalog Items Custom Forms + +The catalog items in the vRA Service Broker consists of different type of content sources - Blueprint, Extensibility Actions, Pipelines, Workflows and AWS CloudFormation Template. As with the 8.12 release, the catalog items custom forms can be versioned. For all types, the same concepts replies - *only current versions for custom forms are de-serializing/serializing.* + +Blueprint type catalog items have different versions that corelate to the released versions of the Blueprints. Only the current version of the latest blueprint version is targeted. + +### Regional Content + +The vRA 8.x philosophy is built around the concept of infrastructure definition capable of resource provisioning - compute, network, storage and other types of resources - that builds up an abstract model for resource description. This allows workload placement to happen dynamically based on various explicit or implicit rules. Part of this abstract model is the definition of various mappings and profiles that provide common higher-level definitions of underlying infrastructure objects. These definitions take the form of various mappings and profiles: + +- flavor mappings - common designation of compute resource t-shirt or other sizing +- image mappings - common designation of VM images +- storage profiles - a set of storage policies and configurations used for workload placement +- network profiles - a set of network-related configurations used for network resource placement + +These abstractions are related to the regions within the cloud accounts and their capabilities. They utilize the various underlying resources which are automatically collected and organized into "fabrics" by vRA. As such, they contain information about resources in the various connected regions and for the purpose of this project are collectively called **regional content**. + +Exporting (pulling) and importing (pushing) of regional content is achieved using a mapping definition specified in the content manifest (content.yaml): `region-mappping`. It contains a set of mapping criteria used for exporting and importing of content. The vRA-NG package manager handles the `export-tag` and `import-tags` entries of the `cloud-account-tags` section of `region-mapping`. + +#### Export Regional Content + +When exporting regional content defined in the respective content categories - `image-mapping`, `flavor-mapping`, `storage-profile`, etc., the vRA-NG package manager takes into account the tag that is defined in the `export-tag` entry and exports content that is related to a cloud account(s) containing this tag. The content is stored in a directory within a unique regional directory bearing the name of the cloud account and the cloud zone id. The cloud account and zone combination are persisted for reference to the originating environment. + +#### Import Regional Content + +The vRA-NG package manager uses the `import-tags` entry from the content manifest (content.yaml) to (re)create regional content targeting cloud accounts that contain one or more of the import tags. The content is taken from all of the regional folders and regardless of its origin, it is imported to the target environment based on the `import-tags`, i.e. related to cloud accounts possessing one or more of the import tags list. + +[//]: # (Optional Section) +[//]: # (## Previous:) + +[//]: # (Optional Section) +[//]: # (## Next:) diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Getting Started.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Getting Started.md new file mode 100644 index 000000000..f29678ce2 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Getting Started.md @@ -0,0 +1,141 @@ +# Getting Started + +## Overview + +vRA 8.x projects are called vRA NG (New Generation) projects in **Build Tools for VMware Aria**. The new Maven Archetype that supports vRA 8.x content is *com.vmware.pscoe.vra-ng.archetypes*. It is a representation of vRA 8.x content into human friendly YAML and/or JSON format.The project consist of content descriptor and content container. + +- *Content Descriptor* defines what part vRA 8.x content will be part of this project - `content.yaml` +- *Content Container* holds the actual content representation -`./src` folder + +## Table Of Contents + +1. [Maven Archetype](#maven-archetype) +2. [Configuring settings xml](#configuring-m2settingsxml-to-work-with-vra-ng) + +### Maven Archetype + +**Build Tools for VMware Aria** provides ready to use project templates (*maven archetypes*). + +To create a new vRA 8.x project from archetype use the following command: + +```Bash +mvn archetype:generate \ + -DinteractiveMode=false \ + -DarchetypeGroupId=com.vmware.pscoe.vra-ng.archetypes \ + -DarchetypeArtifactId=package-vra-ng-archetype \ + -DarchetypeVersion= \ + -DgroupId=local.corp.it.cloud \ + -DartifactId=catalog +``` + +**Note**: *The specified should be minimum 2.4.11* + +#### Content Structure + +The result of this command will produce the following project file structure: + +```ascii +catalog +├── README.md +├── content.yaml +├── pom.xml +├── release.sh +└── src + └── main + └── blueprints + └── blueprint.yaml + └── content.yaml + └── versions.yaml + └── content-sources + └── source.json + └── property-group + └── property_group_name.json + └── catalog-items + └── forms + └── source name__workflow one name with custom form.json + └── source name__workflow one name with custom form__FormData.json + └── source name__workflow three name with custom icon and form.json + └── source name__workflow three name with custom icon and form__FormData.json + └── icons + └── source name__workflow two name with custom icon.png + └── source name__workflow three name with custom icon and form.png + └── source name__workflow one name with custom form.json + └── source name__workflow two name with custom icon.json + └── source name__workflow three name with custom icon and form.json + └── entitlements + └── Blueprint.yaml + └── Workflow.yaml + └── ABX Action.yaml + └── subscriptions + └── subscription.json + └── regions + └── cloud-account-name~region-id + └── flavor-mappings + └── small.json + └── image-mappings + └── mapping.json + └── storage-profiles + └── profile.json + └── src-region-profile.json + └── custom-resources + └── customResource.json + └── resource-actions + └── resourceAction.json + └── policy: + └── approval: + └── aprovalPolicy1.json + └── content-sharing: + └── contentSharingPolicy1.json + └── day2-actions: + └── day2ActionsPolicy1.json + └── deployment-limit: + └── deploymentLimitPolicy1.json + └── lease: + └── leasePolicy1.json + └── resource-quota: + └── resourceQuotaPolicy1.json + + +``` + +Content Descriptor is implemented by content.yaml file with the following defaults. + +**Note**: *vRA NG Project supports only content types outlined into content descriptor.* + +### Configuring ~/.m2/settings.xml to work with vRA-NG + +The following need to be added to the profile that you intend to use: + +```xml + + + + example.vra.url.com + console.cloud.vmware.com + http://proxy.host:80 + 443 + administrator + someSecurePassword + {tenant} + {project+id} + {project+name} + {organization+id} + {org+name} + {refresh+token} + true|false + {vro+integration+name} + +``` + +- `vrang.refresh.token` - will use the given refresh token instead of credentials. + + **Note:** this will take precedence over +credentials. + +- `vrang.bp.unrelease.versions` - Defaults to `true`. Controls whether old versions of a blueprint sould be unreleased. + +- `vrang.data.collection.delay.seconds` - Delay in seconds to wait for vRA data collection to pass before importing data. Can also be passed as an interactive parameter `-Dvrang.data.collection.delay.seconds=600`. useful when Dynamic types and custom resources are used in the projects and vRO content is imported, however vRA needs to then retrieve it in order to be able to create the custom Resource and use the Create/Delete Workflows. This only happens after a short delay and the vRA data collector scrapes vRO. Defaults to no delay. + +#### Organizations + +The `vrang.org.id` needs to be passed, as vRA-ng targets only a single organization. However we can extract the `org.id` from the `org.name`. Meaning that in the end if `org.name` is present, you don't need to pass the `org.id`, however if `org.id` is passed, it will be taken with priority. diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Known Issues.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Known Issues.md new file mode 100644 index 000000000..6ed566a2f --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/General/Known Issues.md @@ -0,0 +1,16 @@ +# Known Issues + +A list of known vRA 8.x archetype issues + +## Table Of Contents + +1. [Custom Resources Known Issues](../Components/Custom%20Resources.md#known-issues) +2. [Blueprints Known Issues](../Components/Blueprints.md#known-issues) +3. [All Local Data Is Pushed](#all-local-data-is-pushed-to-vra) + +### All local data is pushed to vRA + +This is not a bug, but a feature. Reference: [1][1] | [2][2] + +[1]: Core%20Concepts.md#data-handling "Data Handling" +[2]: ../Operations/Pushing.md#usage "Pushing" diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pulling.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pulling.md new file mode 100644 index 000000000..5b746b137 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pulling.md @@ -0,0 +1,19 @@ +# Pulling + +Maven command for pulling vRA 8.x Content + +## Overview + +When working on a vRA 8.x project, you mainly make changes on a live server using the vRA Portal (Service Broker, Cloud Assembly, etc.) and then you need to capture those changes in the maven project on your filesystem to be able to store the content, track changes, collaborate, etc. + +## Table Of Contents + +1. [Usage](#usage) + +### Usage + +To support this use case, the toolchain comes with a custom goal `vra-ng:pull`. The following command will `pull` the content outlined into *Content Descriptor* file to the current project from a specified server and expand its content in the local filesystem overriding any local content: + +```bash +mvn vra-ng:pull -P{profile} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pushing.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pushing.md new file mode 100644 index 000000000..4b0ae4987 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/Operations/Pushing.md @@ -0,0 +1,21 @@ +# Pushing + +Maven command for pushing vRA 8.x Content + +## Overview + +This will push all local content from `./src` folder to the remote vRA Server for the given profile. + +## Table Of Contents + +1. [Usage](#usage) + +### Usage + +To deploy the code developed in the local project or checked out from source control to a live server, you can use the `vrealize:push` command. + +> **Note**: This ignores `content.yaml` + +```bash +mvn package vrealize:push -P{profile} +``` diff --git a/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/README.md b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/README.md new file mode 100644 index 000000000..61bcbdbe5 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Archetypes/vRA 8.x/README.md @@ -0,0 +1,35 @@ +# vRA 8.x Archetype + +vRA 8.x archetype used to pull and push content from/to vRA. + +## Overview + +This archetype is used when you want to pull and push content to vRA. The content you want to pull is defined in `content.yaml`. All exported content goes to `./src`. + +Supported content: + +- `blueprint` +- `subscription` +- `flavor-mapping` +- `image-mapping` +- `storage-profile` +- `custom-resource` +- `catalog-entitlement` +- `catalog-item` +- `content-sources` +- `property-group` + +This Archetype is also known as `vRA-NG` (which stands for **vR**ealize **A**utomation-**N**ew **G**eneration). + +## Navigation + +1. [Getting Started](General/Getting%20Started.md) +2. [Core Concepts](General/Core%20Concepts.md) +3. Operations + - [Pulling](Operations/Pulling.md) + - [Pushing](Operations/Pushing.md) +4. [Content](General/Content.md) +5. Components + - [Custom Resources](Components/Custom%20Resources.md) + - [Blueprints](Components/Blueprints.md) +6. [Known Issues](General/Known%20Issues.md) diff --git a/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/Components/vRA 8.x/README.md b/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/Components/vRA 8.x/README.md new file mode 100644 index 000000000..18367b4e3 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/Components/vRA 8.x/README.md @@ -0,0 +1,16 @@ +[//]: # (Used just for navigation, should not have any information beside very basic one) +[//]: # (If you need to add information to an entry it needs to be moved outside to a different folder) +[//]: # (Change the title) + +# Entry + +[//]: # (Additional Information on the entry goes here) + +[//]: # (What will you learn) + +## Overview + +[//]: # (External navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Navigation diff --git a/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/README.md b/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/README.md new file mode 100644 index 000000000..156b4e97d --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Common/Artifact Manager/README.md @@ -0,0 +1,18 @@ +[//]: # (Used just for navigation, should not have any information beside very basic one) +[//]: # (If you need to add information to an entry it needs to be moved outside to a different folder) +[//]: # (Change the title) + +# Entry + +[//]: # (Additional Information on the entry goes here) + +[//]: # (What will you learn) + +## Overview + +[//]: # (External navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Navigation + +1. [vRA 8.X](Components/vRA%208.x) diff --git a/docs/versions/v2.41.0/Components/Local/Installer/.gitkeep b/docs/versions/v2.41.0/Components/Local/Installer/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Installer/Components/Install Workflow.md b/docs/versions/v2.41.0/Components/Local/Installer/Components/Install Workflow.md new file mode 100644 index 000000000..be3673dd9 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Installer/Components/Install Workflow.md @@ -0,0 +1,47 @@ +# Install workflow + +Most common case of today is to use Install workflow from PsCoE installer library. + +## Overview + +We can run Install workflow automatically and pass to this workflow all necessary parameters: + +- jsonString +- tags +- blacklist + +## Table Of Contents + +1. [vRO workflow run configuration](#vro-workflow-run-configuration) +2. [Installation/configuration values](#installationconfiguration-values) +3. [Installation/configuration file example](#installjson-example) + +### vRO workflow run configuration + +```ts +vro_run_workflow=true +vro_run_workflow_id=1490692845582937823496790834565483423 +vro_run_workflow_input_file_path=./install.json +vro_run_workflow_output_file_path=./output.json +vro_run_workflow_timeout=300 +``` + +### Installation/configuration values + +The installation/configuration values are passed as a json file (or yaml). Each root property of this file should have the name of an input value of the targeted workflow. + +### install.json example + +```JSON +{ + "tags": [ + "conn" + ], + "jsonString": { + "conn": { + "username": "admin", + "password": "p@$$w0rd" + } + } +} +``` diff --git a/docs/versions/v2.41.0/Components/Local/Installer/General/Components/Local/Installer/Components/Install Workflow.md b/docs/versions/v2.41.0/Components/Local/Installer/General/Components/Local/Installer/Components/Install Workflow.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Installer/General/Core Concepts.md b/docs/versions/v2.41.0/Components/Local/Installer/General/Core Concepts.md new file mode 100644 index 000000000..28d86d651 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Installer/General/Core Concepts.md @@ -0,0 +1,17 @@ +# Core Concepts + +## Overview + +We can run any existing workflow automatically at the end of the installation process and pass to the workflow all necessary parameters of different types. Supported types are: + +- string +- number +- boolean +- Array/string + +All other types except mentioned bellow will be send as parameter of type `string`. The most common case of today is to use this feature for running `Install` workflow. + +## Navigation + +1. Components + - [Example of using Install workflow](../Components/Install%20Workflow.md). diff --git a/docs/versions/v2.41.0/Components/Local/Installer/README.md b/docs/versions/v2.41.0/Components/Local/Installer/README.md new file mode 100644 index 000000000..31e8d89c0 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Installer/README.md @@ -0,0 +1,12 @@ +# Installer + +## Overview + +We can run any existing workflow automatically at the end of the installation process and pass to the workflow all necessary parameters. + +## Navigation + +1. General + - [Core Concepts](General/Core%20Concepts.md) +2. Components + - [Example of using Install workflow](Components/Install%20Workflow.md) diff --git a/docs/versions/v2.41.0/Components/Local/Maven/.gitkeep b/docs/versions/v2.41.0/Components/Local/Maven/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Packages/.gitkeep b/docs/versions/v2.41.0/Components/Local/Packages/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Types/.gitkeep b/docs/versions/v2.41.0/Components/Local/Types/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/polyglotpkg/.gitkeep b/docs/versions/v2.41.0/Components/Local/Typescript/polyglotpkg/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vro-scripting-api/.gitkeep b/docs/versions/v2.41.0/Components/Local/Typescript/vro-scripting-api/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vropkg/.gitkeep b/docs/versions/v2.41.0/Components/Local/Typescript/vropkg/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vropkg/README.md b/docs/versions/v2.41.0/Components/Local/Typescript/vropkg/README.md new file mode 100644 index 000000000..7fa5ce41c --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vropkg/README.md @@ -0,0 +1,27 @@ +[//]: # (Remove Comments when you are done) +[//]: # (What is this?) + +# vropkg + +Compiles javascript code to vRO native. + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous:) + +[//]: # (Optional Section) +[//]: # (## Next:) diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/How Does It Work.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/How Does It Work.md new file mode 100644 index 000000000..e6c68252c --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/How Does It Work.md @@ -0,0 +1,42 @@ +# How does it work + +Maintainer specific details on how vrotest works + +## Overview + +`vrotest` gets executed by different Maven Mojos depending on the project archetype. The Mojos of interest are: `maven/plugins/typescript/src/main/java/com/vmware/pscoe/maven/plugins/TypescriptTestMojo.java` + +## Table Of Contents + +1. [Process](#process) +2. [Where is the test bed created](#where-is-the-test-bed-created) +3. [How is testing configured](#how-is-testing-configured) +4. [How is the vRO Runtime injected](#how-is-the-vro-runtime-injected) +5. [How are test helpers used?](#how-are-test-helpers-used) +6. [Where are the code coverage files](#where-are-the-code-coverage-files) + +### Process + +When `mvn clean test` or other maven lifecycle command that calls `test`, the `TypescriptTestMojo` is going to get called. The mojo will execute vrotest with `build` and then with `run`. + +### Where is the test bed created? + +The testbed is created under `PROJECT_ROOT/target/vro-tests` + +### How is testing configured? + +Testing is configured by adding `.nycrc` file in the `vro-tests` folder to configure code coverage and `jasmine.json` to configure the jasmine test runner. + +### How is the vRO Runtime injected? + +The vRO Scripting Api/vRO Runtime is injected as a jasmine helper in the `vro-tests/helpers` folder. The runtime injects a bunch of intrinsic classes as globals. + +More information on Jasmine Helpers, read the official documentation [here](https://jasmine.github.io/pages/docs_home.html) + +### How are test helpers used? + +Test helpers are put in the same folder as the actions, giving you the ability to import them directly. vrotsc gives us the ability to specify the location, and even tho while packaging, they go to a different folder, during testing they go to the same folder + +### Where are the code coverage files? + +THe code coverage are located under `PROJECT_ROOT/target/vro-tests/coverage`. diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/Usage.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/Usage.md new file mode 100644 index 000000000..43e14726f --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/General/Usage.md @@ -0,0 +1,87 @@ +# Usage + +Provides detailed instructions on how to use vrotest + +## Overview + +The usage is divided in 2 steps + +1. `build` -> Builds the test bed +2. `run` -> Runs the unit tests + +If `mvn clean test` is run inside of the created project, build will be executed after which run will be called. + +## Table Of Contents + +1. [Building](#building) - how to build the testbed +2. [Running](#running) - how to run the tests + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Building + +#### Usage + +`vrotest build [options]` + +#### CLI options + +The following commandline options are accepted when building: + +```txt + --actions Path to the vRO JavaScript folder. + --testHelpers Path to the vRO JavaScript test helpers folder. + --tests Path to the folder containing all tests. + --maps Path to the folder containing source maps when using TypeScript. + --resources Path to the folder containing vRO resources. + --configurations Path to the folder containing vRO configurations. + --dependencies Path to the folder containing dependent vRO packages. + --helpers Path to the folder containing vRO scripting API. + --ts-src Path to the original TypeScript code. + --ts-namespace Namespace for the TypeScript project e.g. com.example.myproject + --output Folder where testbed will be created. + --coverage-thresholds Defines the threshold (in %) for the test coverage. Tests will fail if coverage is below the threshold. + Format: :: + Types: + * all + * branches + * lines + * functions + * statements + --coverage-reports Specify test coverage reports to use. + Availale values: + * text + * html + * json + * clover + * cobertura + * lcov + * lcovonly + --per-file Code coverage per file bases. Set custom --coverage-thresholds, if any file in the project drops below those thresholds, the build will fail +``` + +#### Examples + +```bash +vrotest build --actions src --testHelpers src --tests test --output target/vro-test --coverage-thresholds 50:60:all,65:70:statements --coverage-reports text,html,lcovonly +``` + +### Running + +#### Usage + +```bash +vrotest run [testbed path] [options] +``` + +#### CLI options + +The following commandline options are accepted when running tests: + +```plaintext + --instrument Instrument code and generate code coverage reports. +``` + +#### Examples + +`vrotest run target/vro-test --instrument` diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/README.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/README.md new file mode 100644 index 000000000..a3a9647a5 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotest/README.md @@ -0,0 +1,12 @@ +# vrotest + +`vrotest` is a utility that is used to run jasmine tests on the client machine. + +## Overview + +`vrotest` is responsible for building a test bed, instrumenting it if needed, and running jasmine tests. It enables code coverage using istanbuljs. + +## Navigation + +1. [Usage](General/Usage.md) - how to use vrotest +2. [How does it work](General/How%20Does%20It%20Work.md) diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/Components/Test Helpers.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/Components/Test Helpers.md new file mode 100644 index 000000000..581b7c5cb --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/Components/Test Helpers.md @@ -0,0 +1,50 @@ +# Test Helpers + +Test helpers are compiled to a different directory than the one specified for actions. + +## Overview + +`vrotsc` gives you the ability to specify a different directory for the test helpers. Usually these files need to be excluded from vRO packaging since they are used only for testing purposes. + +## Table Of Contents + +1. [How is a test helper defined?](#how-is-a-test-helper-defined) +2. [How is a test helper compiled?](#how-is-a-test-helper-compiled) +3. [Why is there no transformer file for a testHelper](#why-is-there-no-transformer-file-for-a-testhelper) +4. [How to import a test helper](#how-to-import-a-test-helper) + +### How is a test helper defined? + +A test helper is defined by following the pattern: `*.helper.[tj]s`. + +### How is a test helper compiled? + +Due to VROES limitations, during compilation, the file name is changed from : `example.helper.ts` to `example_helper.js`. VROES works in a way where all dots AFTER the final slash will be replaced with underscores (e.g. `com.vmware.pscoe.vrotsc.actions/test.helper` gets compiled to `com.vmware.pscoe.vrotsc.actions.test_helper` ). + +### Why is there no transformer file for a testHelper? + +A Test Helper is essentially an action. Where the test helper is put is decided inside the action transformer. + +### How to import a test helper? + +The same way you would another action. + +#### Example + +`test.helper.ts`: + +```typescript +export default function (){ + return Math.random(); +} +``` + +`example.ts`: + +```typescript +import testHelper from "./test.helper"; + +export default function () { + return testHelper(); +} +``` diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/General/Usage.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/General/Usage.md new file mode 100644 index 000000000..fb513751f --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/General/Usage.md @@ -0,0 +1,58 @@ +# Usage + +Provides detailed instructions on how to use vrotsc + +## Overview + +`vrotsc` has only one command to run, with different options. Detailed instructions can be found below on the possible options as well as an example. + +## Table Of Contents + +1. [Running](#running) + +### Running + +#### Usage + +```bash +vrotsc [SRC_DIR] [OPTIONS] +``` + +#### CLI options + +The following commandline options are accepted: + +```plaintext + -h, --help Print this message. + -v, --version Print the compiler's version. + -p, --project Path to the tsconfig.json file to use. + --emitHeader Emit auto-generated header on top of each file. + --actionsOut Specify the output directory for actions. + --testHelpersOut Specify the output directory for test helpers. + --workflowsOut Specify the output directory for workflows. + --configsOut Specify the output directory for configuration elements. + --resourcesOut Specify the output directory for resource elements. + --testsOut Specify the output directory for tests. + --typesOut Specify the output directory for types. + --mapsOut Specify the output directory for source maps. + --actionsNamespace Specify actions namespace. + --workflowsNamespace Specify workflows namespace. +``` + +#### Examples + +```bash +vrotsc src \ + --actionsNamespace com.vmware.pscoe.example \ + --workflowsNamespace example \ + --files \ + --typesOut target/vro-types \ + --testsOut target/vro-sources/test/com/vmware/pscoe/example \ + --mapsOut target/vro-sources/map/com/vmware/pscoe/example \ + --actionsOut target/vro-sources/js/src/main/resources/com/vmware/pscoe/example \ + --testHelpersOut target/vro-sources/testHelpers/src/main/resources/com/vmware/pscoe/example \ + --workflowsOut target/vro-sources/xml/src/main/resources/Workflow \ + --policiesOut target/vro-sources/xml/src/main/resources/PolicyTemplate \ + --resourcesOut target/vro-sources/xml/src/main/resources/ResourceElement \ + --configsOut target/vro-sources/xml/src/main/resources/ConfigurationElement +``` diff --git a/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/README.md b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/README.md new file mode 100644 index 000000000..4784eabb9 --- /dev/null +++ b/docs/versions/v2.41.0/Components/Local/Typescript/vrotsc/README.md @@ -0,0 +1,16 @@ +# vrotsc + +`vrotsc` is a utility used to transpile typescript/other code to vRO native code. + +## Overview + +`vrotsc` is responsible for transpiling all sorts of code to native vRO code. It works with actions, workflows, configurations, resource elements, native, declarations, policy templates and tests + +[//]: # (External navigation) +[//]: # (Navigational links may have a short description after them separated by a `-`) + +## Navigation + +1. [Usage](General/Usage.md) - how to use vrotsc +2. Components + - [Test Helpers](Components/Test%20Helpers.md) - Information on test Helpers diff --git a/docs/versions/v2.41.0/Components/README.md b/docs/versions/v2.41.0/Components/README.md new file mode 100644 index 000000000..6100c925b --- /dev/null +++ b/docs/versions/v2.41.0/Components/README.md @@ -0,0 +1,23 @@ +# Build Tools for VMware Aria Components + +Navigation to different components of the Toolchain + +## Overview + +The Components are divided in 2 types. + +1. Archetypes -> Project Archetype that Build Tools for VMware Aria can generate +2. Local -> Local developer-centric documentation on how different Components of Build Tools for VMware Aria work + +[//]: # (External navigation) + +## Navigation + +1. Archetypes + * [Typescript](./Archetypes/typescript) +2. Local + * [vrotsc](./Local/Typescript/vrotsc) + * [vrotest](./Local/Typescript/vrotest) + * [vropkg](./Local/Typescript/vropkg) + * [vro-scripting-api](./Local/Typescript/vro-scripting-api) + * [polyglotpkg](./Local/Typescript/polyglotpkg) diff --git a/docs/versions/v2.41.0/General/Cheatsheets/.gitkeep b/docs/versions/v2.41.0/General/Cheatsheets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/General/Cheatsheets/abx-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/abx-plugin-arguments.md new file mode 100644 index 000000000..23194df8b --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/abx-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'abx-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:abx-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/actions-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/actions-plugin-arguments.md new file mode 100644 index 000000000..51df1053e --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/actions-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'o11n-actions-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-actions-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/bsc-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/bsc-plugin-arguments.md new file mode 100644 index 000000000..50290c2ab --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/bsc-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'bsc-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:bsc-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/cs-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/cs-plugin-arguments.md new file mode 100644 index 000000000..2a186ecda --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/cs-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'cs-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:cs-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/polyglot-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/polyglot-plugin-arguments.md new file mode 100644 index 000000000..c3835e9fd --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/polyglot-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'o11n-polyglot-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-polyglot-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/ssh-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/ssh-plugin-arguments.md new file mode 100644 index 000000000..5ab67318c --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/ssh-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'ssh-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:ssh-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:ssh-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/typescript-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/typescript-plugin-arguments.md new file mode 100644 index 000000000..2393b373a --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/typescript-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'o11n-typescript-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-typescript-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vcd-ng-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vcd-ng-plugin-arguments.md new file mode 100644 index 000000000..9054ab487 --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vcd-ng-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vcd-ng-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vcd-ng-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vra-ng-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vra-ng-plugin-arguments.md new file mode 100644 index 000000000..4069be4b0 --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vra-ng-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vra-ng-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-ng-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vra-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vra-plugin-arguments.md new file mode 100644 index 000000000..b975c1118 --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vra-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vra-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vra-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vrealize-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vrealize-plugin-arguments.md new file mode 100644 index 000000000..8d8a14710 --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vrealize-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vrealize-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrealize-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vrli-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vrli-plugin-arguments.md new file mode 100644 index 000000000..ef8bf4ffe --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vrli-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vrli-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrli-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/vrops-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/vrops-plugin-arguments.md new file mode 100644 index 000000000..40e1c1fef --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/vrops-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'vrops-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:vrops-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Cheatsheets/xml-plugin-arguments.md b/docs/versions/v2.41.0/General/Cheatsheets/xml-plugin-arguments.md new file mode 100644 index 000000000..9bd20c70b --- /dev/null +++ b/docs/versions/v2.41.0/General/Cheatsheets/xml-plugin-arguments.md @@ -0,0 +1,11 @@ +[ERROR] +[ERROR] groupId: 'com.vmware.pscoe.maven.plugins' +[ERROR] artifactId: 'o11n-xml-package-maven-plugin' +[ERROR] version: '2.39.1-SNAPSHOT': Plugin com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:2.39.1-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact com.vmware.pscoe.maven.plugins:o11n-xml-package-maven-plugin:jar:2.39.1-SNAPSHOT +[ERROR] -> [Help 1] +[ERROR] +[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. +[ERROR] Re-run Maven using the -X switch to enable full debug logging. +[ERROR] +[ERROR] For more information about the errors and possible solutions, please read the following articles: +[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException diff --git a/docs/versions/v2.41.0/General/Core Concepts.md b/docs/versions/v2.41.0/General/Core Concepts.md new file mode 100644 index 000000000..205e90d9a --- /dev/null +++ b/docs/versions/v2.41.0/General/Core Concepts.md @@ -0,0 +1,23 @@ +# Core Concepts + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) + +## Overview + +[//]: # (Internal navigation) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous) + +[//]: # (Optional Section) +[//]: # (## What's Next) diff --git a/docs/versions/v2.41.0/General/Examples/.gitkeep b/docs/versions/v2.41.0/General/Examples/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/General/Examples/README.md b/docs/versions/v2.41.0/General/Examples/README.md new file mode 100644 index 000000000..391157e9b --- /dev/null +++ b/docs/versions/v2.41.0/General/Examples/README.md @@ -0,0 +1,21 @@ +# Examples + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional) + +## Overview + +[//]: # (Internal navigation) + +## Table Of Contents + +1. [Section](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Read Next:) diff --git a/docs/versions/v2.41.0/General/FAQ.md b/docs/versions/v2.41.0/General/FAQ.md new file mode 100644 index 000000000..a84596cd1 --- /dev/null +++ b/docs/versions/v2.41.0/General/FAQ.md @@ -0,0 +1,17 @@ +# Frequently Asked Questions + +[//]: # (Internal navigation) + +## Table Of Contents + +1. [Section](#section-one) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section One + +[//]: # (Optional Section) +[//]: # (## Previous) + +[//]: # (Optional Section) +[//]: # (## What's Next) diff --git a/docs/versions/v2.41.0/General/Getting Started.md b/docs/versions/v2.41.0/General/Getting Started.md new file mode 100644 index 000000000..d670e4942 --- /dev/null +++ b/docs/versions/v2.41.0/General/Getting Started.md @@ -0,0 +1,19 @@ +# Getting Started + +Here you will find information on how to easily get onboarded working with Build Tools for VMware Aria. + +## Overview + +Build Tools for VMware Aria relies on a private artifact manager like JFrog Artifactory OSS ( no limitation to it being public, but possibly not desirable ). Here you will find instructions on how to setup such an environment. + +Build Tools for VMware Aria also has some local dependencies that need to be configured and we will talk about them as well. + +## Table Of Contents + +- [Prerequisites](./Getting%20Started/Prerequisites.md) +- [Setting Up Artifactory](./Getting%20Started/Setting%20Up%20Artifactory.md) +- [Setting Up Local Environment](./Getting%20Started/Setting%20Up%20Local%20Environment.md) + +## What's Next + +See [Prerequisites](./Getting Started/Prerequisites.md). diff --git a/docs/versions/v2.41.0/General/Getting Started/Prerequisites.md b/docs/versions/v2.41.0/General/Getting Started/Prerequisites.md new file mode 100644 index 000000000..937684dc4 --- /dev/null +++ b/docs/versions/v2.41.0/General/Getting Started/Prerequisites.md @@ -0,0 +1,50 @@ +# Prerequisites + +[//]: # (TODO: Update the links in the Use section after the files are moved) +[//]: # (TODO: More in Installation section?) +[//]: # (TODO: Replace all references of the setup-workstation.md to point to Prerequisites.md) + +## Overview + +Prerequisites for installation of Build Tools for VMware Aria. + +## Table Of Contents + +1. [Prerequisites](#prerequisites) +2. [Installation and Configuration](#installation-and-configuration) +3. [Usage](#usage) + +### Prerequisites + +- [vRealize Developer Tools](https://github.com/vmware/vrealize-developer-tools) (Optional) +- Java 17 +- Maven 3.5+ ([official installation guide](https://maven.apache.org/install.html)) +- NodeJS 16.x.x (use `nvm` if possible) [official downloads](https://nodejs.org/en/download/releases/) +- Development vRealize Automation Tenant configured with development vRealize Orchestrator + - Tenant administrator user + - Workstation can access vRA server on port 443 +- Development vRealize Orchestrator + - vRO administrator user + - vRO appliance root user + - Workstation can access vRO server on ports [443 or 8281], 8283 +- Powershell Core for Linux/MacOS if working with the polyglot powershell archetype. + - [MacOS]( https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-macos ) + - [Linux]( https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux ) + +### Installation and Configuration + +#### Configuration + +- [Build Tools for VMware Aria Build System](Setting%20Up%20Artifactory.md) + +### Usage + +- [vRO Projects](use-workstation-vro-project.md) +- [vRA Projects](use-workstation-vra-project.md) +- [vRA NG Projects](use-workstation-vra-ng-project.md) +- [ABX Projects](use-workstation-abx-project.md) +- [vROps Projects](use-workstation-vrops-project.md) + +## What's Next + +See [Setting Up Artifactory](./Setting%20Up%20Artifactory.md). diff --git a/docs/versions/v2.41.0/General/Getting Started/Setting Up Artifactory.md b/docs/versions/v2.41.0/General/Getting Started/Setting Up Artifactory.md new file mode 100644 index 000000000..b61006669 --- /dev/null +++ b/docs/versions/v2.41.0/General/Getting Started/Setting Up Artifactory.md @@ -0,0 +1,107 @@ +# Setting Up Artifactory + +[//]: # (TODO: Modernize - validate or adapt content) +[//]: # (TODO: Replace all references of the setup-platform.md to point to Setting Up Artifactory.md) + +Here you will learn the needed steps on how to configure the artifactory + +## Overview + +## Table Of Contents + +1. [Configuring Artifactory](#configuring-artifactory) +2. [Configure permissions for local cache for the Anonymous user](#configure-permissions-for-local-cache-for-the-anonymous-user) +3. [Uploading toolchain artifacts to Artifactory](#uploading-toolchain-artifacts-to-artifactory) +4. [Upload vRO artifacts to Artifactory (if needed)](#upload-vro-artifacts-to-artifactory-if-needed) + +### Configuring Artifactory + +Note that the libs-release, libs-snapshot etc. are the default Maven repositories created by JFrog's **Quick Setup** shown at first login. This guide assumes that this **Quick Setup** has been executed. + +1. Create a local repository in artifactory to contain the toolchain artifacts, e.g. **vrealize-build-tools** and add it to the virtual release repository (e.g. **libs-release**) +2. Create a remote repository and configure the maven central public repository ([https://repo1.maven.org/maven2/](https://repo1.maven.org/maven2/)). Add it to the virtual release repository (e.g. **libs-release**). This is needed so any public dependencies can be downloaded as well. + +### Configure permissions for local cache for the Anonymous user + +1. Login into Artifactory with admin privileges +2. Navigate to **Admin > Permissions** +3. Click the **New** button +4. Add a name for the permissions (for example: Anonymous Cache) +5. Add all repositories into the **Selected Repositories** list view +6. Skip the groups section +7. On the **Users** section add **Anonymous** user +8. Give **Deploy/Cache, Annotate, Read** permissions +9. Click **Save & Finish** + +### Uploading toolchain artifacts to Artifactory + +#### Via Cli + +1. Unzip **iac-maven-repository.zip** found at **artifacts/maven/** path relative to the root of the toolchain bundle to a folder, e.g. **import/** +2. Go to the directory where you have unzipped the archive. Your working directory should contain the "com" folder and the **archetype-catalog.xml** file, e.g.: + + ```bash + root@photon-G6H8GzV2j [ ~/toolchain/import ]# ls + archetype-catalog.xml com + ``` + +3. Run `jfrog config add` to configure your local environment with the artifactory server. +4. Then, run the following command + + ```jfrog rt u --recursive=true --flat=false ./* vrealize-build-tools``` + + where **vrealize-build-tools** should be the name of the repository you've created at step #1 in [Configuring Artifactory](#configuring-artifactory). + +5. Examine the output of the command. It should look something similar to this: + + ```bash + Uploading artifact: /path/to/artifact/some-artifact.jar + { + "status": "success", + "totals": { + "success": 1, + "failure": 0 + } + } + ``` + + **Note:** There is a chance that not all of the artifacts will be uploaded (you will be getting a lot of errors). If this happens, you can re-run the command. + +#### Via UI + +> **FINISH** + +### Upload vRO artifacts to Artifactory (if needed) + +First you need access to a supported version of vRO appliance to get the vRO dependencies for the toolchain in your artifactory. + +1. Get all vRO artifacts on the local machine. Run: + + ```bash + wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://:/vco-repo/com/ + wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://:/vco-repo/com/vmware/o11n/mojo/pkg/ + wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://:/vco-repo/com/vmware/o11n/pkg + ``` + +2. Create a new local repository (e.g. **vro-local**) and add it to the virtual release repository (e.g. **libs-release**). + +3. Navigate to the root folder of the downloaded repository on the local filesystem - at the same level as the **com** directory. E.g.: + + ```bash + root@photon-G6H8GzV2j [ ~/192.168.71.1/vco-repo ]# ls + com + ``` + +4. Import the vro artifacts to the selected repository, for example: + + ```bash + jfrog rt u --recursive true --flat false ./* vro-local + ``` + +## Previous + +See [Prerequisites](./Prerequisites.md). + +## What's Next + +See [Setting Up Local Environment](./Setting%20Up%20Local%20Environment.md). diff --git a/docs/versions/v2.41.0/General/Getting Started/Setting Up Local Environment.md b/docs/versions/v2.41.0/General/Getting Started/Setting Up Local Environment.md new file mode 100644 index 000000000..80a56069e --- /dev/null +++ b/docs/versions/v2.41.0/General/Getting Started/Setting Up Local Environment.md @@ -0,0 +1,289 @@ +# Setting Up Local Environment + +[//]: # (TODO: Modernize - validate or adapt content) + +[//]: # (TODO: Replace all references of the setup-workstation-maven.md to point to Setting Up Local Environment.md) + +Here you will learn the needed steps on how to configure your environment + +## Overview + +**Build Tools for VMware Aria** are built on top of the Maven build automation ecosystem. vRealize Automation and vRealize Orchestrator content are described as Maven Project Object Models which enable huge amount of options like automated build going through phases like validate, compile, test, package, verify, install and deploy; dependency management, versioning, etc. + +## Table Of Contents + +1. [Installation](#installation) +2. [Configuration](#configuration) + 1. [Java Keystore](#java-keystore) + 2. [Global Configuration](#global-configuration-settingsxml) + 3. [Signing](#signing) + 4. [Bundling](#bundling) + 5. [Security](#security) + 6. [Timeouts](#timeouts) + 7. [Delays](#delays) + 8. [Checksums](#checksums) + +### Installation + +#### Prerequisites + +- Build Tools for VMware Aria Platform + - [Build Tools for VMware Aria Platform](Setting%20Up%20Artifactory.md) ready to use + - Workstation can access Build Tools for VMware Aria Platform services +- Java 17 +- Maven 3.5+ ([official installation guide](https://maven.apache.org/install.html)) + +### Configuration + +There are several things that need to be in place before you can use the Build Tools for VMware Aria to work with vRO content. + +#### Java Keystore + +Java keystore used for signing packages build time. + +```shell +# Create new Keystore +keytool -keystore package.jks -genkey -alias _dunesrsa_alias_ -storepass 'VMware1!' -keyalg RSA + +# Delete default alias +keytool -delete -alias _dunesrsa_alias_ -keystore package.jks -storepass 'VMware1!' + +# Generate new Key +keytool -genkey -keyalg RSA -keysize 2048 -alias _dunesrsa_alias_ -keystore package.jks -storepass 'VMware1!' -validity 3650 -dname 'CN=Project,OU=Department,O=Company,L=City,ST=State,C=XX,emailAddress=administrator@vsphere.local' + +## Optional ## + +# Generate Certificate Signing Request +keytool -certreq -alias _dunesrsa_alias_ -keypass 'VMware1!' -keystore package.jre -storepass 'VMware1!' -file packageCertRequest.csr + +# Import the signed certificate +keytool -importcert -alias _dunesrsa_alias_ -keypass 'VMware1!' -file packageCertRequest.crt -keystore package.jks -storepass 'VMware1!' + +# Export/Backup Certificate +keytool -exportcert -alias _dunesrsa_alias_ -keystore package.jks -storepass 'VMware1!' -file packageCertExport +``` + +> **Note**: Mind the single quotes in the examples above on Windows - those might be part of the passowrd depending on which interpreter (shell) you are using. Correct the string literal and escaping appropriately for your case. + +**Note**: JKS is a propriatary format specific to the particular JVM provider. When running above commands, ensure the keytool used is the one under the JVM that Maven would use (check with `mvn -v`). + +#### Global Configuration (*settings.xml*) + +Firstly, you will need to configure Maven. + +There are a number of properties that must be set through profiles in the settings.xml file, as they are environment specific: + +- keystorePassword - Required. This is the password for the keystore used for signing vRO packages. +- keystoreLocation - Required. This is the location of the keystore. You can either hardcode a location on the machine executing the build. +- snapshotRepositoryUrl - Required. This is the url of the snapshot maven repository. +- releaseRepositoryUrl - Required. This is the url of the release maven repository. Could be the same as snapshotRepositoryUrl. + +The recommended approach is to keep a settings XML file under SCM to be used by developers and a modified version with credentials for the Artifactory deployed on the CI server directly (i.e. not accessible by everyone). + +Furthermore, in the example, bundling (i.e. should the bundle.zip be produced upon build) is moved to a separate profile and developers/CI can choose whether to create the bundle or not by including the "-Pbundle" command line argument to the maven invocation. + +```xml + + + + + {vro_username} + {native+maven+encrypted+pass} + corp-dev-vro + + + {vra_username} + {native+maven+encrypted+pass} + corp-dev-vra + + + + + packaging + + + + + com.vmware.pscoe.build + archetype.keystore + 2.0.0 + target/${keystoreArtifactId}-${keystoreVersion}/private_key.pem + target/${keystoreArtifactId}-${keystoreVersion}/cert.pem + VMware1! + + + + bundle + + false + + + + artifactory + + + false + central + central + http://{artifactory-hostname}/artifactory/{release_repository} + + + true + central-snapshots + central-snapshots + http://{artifactory-hostname}/artifactory/{snapshot_repository} + + + + + false + central + central + http://{artifactory-hostname}/artifactory/{release_repository} + + + true + central-snapshots + central-snapshots + http://{artifactory-hostname}/artifactory/{snapshot_repository} + + + + http://{artifactory-hostname}/artifactory/{release_repository} + http://{artifactory-hostname}/artifactory/{snapshot_repository} + + + + + corp-dev + + + {vro_host} + {vro_port} + {vro_username} + {vro_password} + corp-dev-vro + {basic|vra} + {auth_host} + {auth_port} + {refresh_token} + http://proxy.host:80 + {vro_tenant} + + {vra_host} + {vra_port} + {vra_tenant} + corp-dev-vra + {vra_username} + {vra_password} + + + + + artifactory + packaging + + +``` + +> **Note**: {vro_username} is usually taking the form of `username@domain`. For vRO8 embedded in vRA8 with BASIC for {vro_auth} it will be required that only `username` part is specified for successful authentication. + +#### Signing + +vRO packages are signed. In order to be able to use the toolchain, you have to have a keystore and configure it in the settings.xml file both for the developers and the CI. + +##### Keystore located on the building machine + +You must have the keystore file accessible on the machine and set the **keystoreLocation** and **keystorePassword** properties through the settings.xml. + +#### Bundling + +There is a built-in bundling capabilities that are described in a Maven profile. You can decide to not only package a vRO/vRA project, but also to create a `*-bundle.zip` with all its dependencies. This will create an archive with the following structure: + +```sh +vro/ # all vRO packages. If the current project is vRO, its package will be here as well. +vra/ # all vRA packages. IF the current project is vRA, its package will be here as well. +repo/ # JARs that comprise the bundle installer - a CLI tool that is capable of importing the whole bundle to a target environment. +bin/ # shells for invoking the bundle installer CLI. + installer # Bash executable version of the installer for Linux/Unix/macOS + intasller.bat # Batch exectable version of the installer for Windows +``` + +The bundle is produced as a separate artifact during `mvn package`. To produce it, you need to add the `-Pbundle-with-installer` profile: + +```bash +mvn clean deploy -Pbundle-with-installer +``` + +To learn more about the bundle installer, check [Build Tools for VMware Aria - Bundle Installer](use-bundle-installer.md) for more information. + +#### Security + +All API calls from the toolchain (i.e. the client) verify the SSL certificate returned by vRO/vRA (i.e. the server). If you are using self-signed or third-party signed certificates, you may need to add those certificates or their CA certificates to the default JAVA keystore, i.e. `JAVA_HOME/lib/security/cacerts`. **This is the recommended approach.** + +The other option, **applicable ONLY for development environments**, is to ignore certificate checks by passing a flag. + +#### Timeouts + +Controlling timeouts is done through the following System Properties: + +- the Connection Timeout ("vrealize.connection.timeout") – the time to establish the connection with the remote host (Defaults to 360 seconds (6 minutes)) +- the Socket Timeout ("vrealize.socket.timeout") – the time waiting for data – after establishing the connection maximum time of inactivity between two data packets (Defaults to 360 seconds(6 minutes)) +- the vra 8.x content import timeout ("vrang.import.timeout") – (in miliseconds) the time out waiting for import of custom forms / content sources to complete (Defaults to 6 seconds) + +#### Delays + +- the vra 8.x data collection delay ("vrang.data.collection.delay.seconds") – (in seconds) the amount of time to way before running the import job. The vRA data collection usually takes around 10 minutes ( 600 seconds ) to complete. Defaults to no delay. + + You can set these as JVM Options as specified [here](https://maven.apache.org/configure.html) + +- Timeouts can be set up to be used by the installer too using the following settings (in the environment properties file): + - http_connection_timeout - for the connection timeout (in seconds), default is 360 seconds (6 minutes) + - http_socket_timeout - for the socket timeout (in seconds), default is 360 seconds (6 minutes) + - vrang_import_timeout - for the vra 8.x content import timeout (custom forms, content sources). + +#### Checksums + +Checksums are supported for the following project types - vRO JS, TS, XML and vRA 7/8. By defaults the target folder will also contain .sha1 checksums for the different file types, e.g. js.sha1, ts.sha1, xml.sha1, content.sha1 and packages.sha1. These are specified per project type in the base pom.xml using following definition: + +```xml + + ... + js,packages + ... + +``` + +To add more checksum definitions for your project, just redefine this property in your pom.xml. For example, add the "docs" checksum to the build: + +```xml + + ... + js,packages,docs + ... + +``` + +With the "docs" prefix you can now specify if the phase is enabled, readmes location directory, files glob filter and as well list of excludes RegExp patterns of files to ommit. For example like this: + +```xml + + ... + js,packages,docs + + true + docs/markdown + *.md + \.docx$,\.pdf$ + ... + +``` + +## Previous + +See [Setting Up Artifactory](./Setting%20Up%20Artifactory.md). diff --git a/docs/versions/v2.41.0/General/Guides/.gitkeep b/docs/versions/v2.41.0/General/Guides/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/General/Installation.md b/docs/versions/v2.41.0/General/Installation.md new file mode 100644 index 000000000..49e3e90ff --- /dev/null +++ b/docs/versions/v2.41.0/General/Installation.md @@ -0,0 +1,24 @@ +# Installation + +[//]: # (Additional Information on the topic goes here) + +[//]: # (What will you learn) +[//]: # (Optional but highly recommended) + +## Overview + +[//]: # (Internal navigation) + +## Table Of Contents + +1. [Secion](#section) + +[//]: # (Fill As many of these as you need. Use h4 and further here, do not include h1s, h2s or h3s.) + +### Section + +[//]: # (Optional Section) +[//]: # (## Previous) + +[//]: # (Optional Section) +[//]: # (## What's Next) diff --git a/docs/versions/v2.41.0/General/Known Issues/.gitkeep b/docs/versions/v2.41.0/General/Known Issues/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/General/Use Cases/.gitkeep b/docs/versions/v2.41.0/General/Use Cases/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/versions/v2.41.0/README.md b/docs/versions/v2.41.0/README.md new file mode 100644 index 000000000..17d8503cb --- /dev/null +++ b/docs/versions/v2.41.0/README.md @@ -0,0 +1,22 @@ +# v2.41.0 + +Build Tools for VMware Aria is a tool that helps enterprises adhere to Infrastructure-as-Code principles in a wide variety +of VMware tools. + +## Navigation + +- [Core Concepts](./General/Core%20Concepts.md) +- [Getting Started](./General/Getting%20Started.md) +- [Installation](./General/Installation.md) +- [Use Cases](./General/Use%20Cases) +- What's next + - [Examples](./General/Examples) + - [Cheatsheets](./General/Cheatsheets) + - [Guides](./General/Guides) + - [Known Issues](./General/Known%20Issues) +- [Components](./Components) +- [FAQ](./General/FAQ.md) + +## What's Next + +See [Release](./Release.md). diff --git a/docs/versions/v2.41.0/Release.md b/docs/versions/v2.41.0/Release.md new file mode 100644 index 000000000..9fd7d01c1 --- /dev/null +++ b/docs/versions/v2.41.0/Release.md @@ -0,0 +1,787 @@ +# v2.41.0 + +## Breaking Changes + + +## Deprecations + + + +## Features + + +### *Error handling for workflow canvas elements* + +There is a new decorator added `@Err` that can be used with arguments. This decorator will mean that the argument will be bound to the exeption if it occurs. +Note, you add it as normal `@In` or `@Out` decorators, but the variable should not be used in the method. + +Furthermore, supported canvas items now have `exception` parameter that can be used to specify the method that will handle the exception. + +#### Supported Canvas Items + +- `@Item` +- `@AsyncWorkflowItem` +- `@ScheduledWorkflowItem` +- `@WorkflowItem` +- `@ActionItem` +- `@DecisionItem` +- `@WaitingTimerItem` + +#### Example + +```typescript +import { Workflow, Out, In, Err, RootItem, Item } from "vrotsc-annotations"; + +@Workflow({ + name: "Example", + path: "VMware/PSCoE", + attributes: { + error: { + type: "string" + } + } +}) +export class Example { + @Item({ + target: "end", + exception: "exceptionHandle" + }) + @RootItem() + public start(@Err error: string) { + if (true) { + throw new Error("Error"); + } + } + + @Item({ target: "end" }) + public exceptionHandle(@In error: string) { + System.log(`Error: ${error}`); + } +} +``` +### Support of Objects in the VROES.Shims.arrayFrom() Method + +Add support for objects in the `VROES.Shims.arrayFrom()` method so its behavior is similar to the standard `Array.from()` method. + +### *Better ordering of the canvas items* + +The canvas items are now ordered based on an tree algorithm. + +Example: + +From input: + +```ts +const nodes = [ + { name: "A", targets: ["B"] }, + { name: "B", targets: ["C"] }, + { name: "C", targets: ["D", "G"] }, + { name: "D", targets: ["E", "F"] }, + { name: "E", targets: ["C"] }, + { name: "F", targets: ["O"] }, + { name: "G", targets: ["H"] }, + { name: "H", targets: ["I"] }, + { name: "I", targets: ["J", "K", "L", "M"] }, + { name: "J", targets: [] }, + { name: "K", targets: [] }, + { name: "L", targets: [] }, + { name: "M", targets: [] }, + { name: "O", targets: ["P"] }, + { name: "P", targets: ["Q"] }, + { name: "Q", targets: [] }, + + // Second start? + { name: "S", targets: ["T"] }, + { name: "T", targets: ["U", "W", "D"] }, + { name: "U", targets: [] }, + { name: "W", targets: [] }, + { name: "X", targets: ["Y"] }, + { name: "Y", targets: [] }, +]; +``` + +We get: +```log +.................................................................................................... +.................................................................................................... +.................................................................................................... +..............................F....O....P....Q...................................................... +.................................................................................................... +.................................................................................................... +....................D....E.......................................................................... +.................................................................................................... +.....A....B....C...................J................................................................ +.................................................................................................... +.................................................................................................... +....................G....H....I..................................................................... +.................................................................................................... +.....S....T....U...................K................................................................ +.................................................................................................... +.................................................................................................... +.................................................................................................... +.................................................................................................... +...............W...................L................................................................ +.................................................................................................... +.................................................................................................... +.................................................................................................... +.................................................................................................... +...................................M................................................................ +.................................................................................................... +.................................................................................................... +``` +### Support python 3.10 runtime + +Add support for python 3.10 runtime in Orchestrator. This is now the default, since python 3.7 is deprecated. + +### *New `@ActionItem` decorator for Workflows* + +The new decorator gives you the ability to specify a canvas item that calls an action. + +#### Supported Parameters + +- `target` - The name of the next in line item. Same as `@Item`. +- `scriptModule` - The path of the action you want to call and the action name, separated by `/`. Example: `com.vmware.pscoe.library.general/echo`. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +#### Outputs + +There is a requirement to have only one output, and it will be of type `ActionResult`. + +#### Example + +```typescript +import { Workflow, Out, In, Item, ActionItem } from "vrotsc-annotations"; + +@Workflow({ + name: "Example", + path: "VMware/PSCoE", + attributes: { + first: { + type: "number" + }, + second: { + type: "number" + }, + actionResult: { + type: "ActionResult" + } + } +}) +export class Example { + @ActionItem({ + target: "printActionResult", + scriptModule: "com.vmware.pscoe.onboarding.sgenov.actions/test" + }) + public callTestAction(@In first: number, @In second: number, @Out actionResult: ActionResult) { + } + + @Item({ target: "end" }) + public printActionResult(@In actionResult: ActionResult) { + System.log(`Action result: ${actionResult.getResult()}`); + } +} +``` + +### *New `DefaultErrorHandler` decorator for Workflows* + +This decorator is used to specify a default error handler. It can be bound either to a workflow item component or workflow end. + +#### Supported Parameters + +- `target` - target item to be attached to the default error handler, could be one of workflow item or workflow end. +- `exceptionVariable` - Exception variable that will hold the exception data when triggered. + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +Example: + +```typescript +import { + Workflow, + RootItem, + In, + Out, + Item, + DefaultErrorHandler, + WorkflowEndItem, +} from "vrotsc-annotations"; + +@Workflow({ + name: "Default Error Handler Custom Item", + path: "VMware/PSCoE", + description: + "Default error handler workflow with error handler redirecting to a workflow item", + attributes: { + errorMessage: { + type: "string", + }, + }, +}) +export class HandleDefaultError { + @RootItem() + public initiateWorkflow() { + System.log("Initiating workflow execution"); + } + + @Item({ + target: "workflowEnd", + }) + public processError(@In errorMessage: string) { + System.log( + `Processing error using custom task with message '${errorMessage}'` + ); + } + + @DefaultErrorHandler({ + exceptionVariable: "errorMessage", + target: "processError", + }) + public defaultErrorHandler(@Out errorMessage: string) { + // NOOP + } + + @WorkflowEndItem({ + endMode: 0, + exceptionVariable: "errorMessage", + }) + public workflowEnd(@Out errorMessage: string) { + System.log(`Terminating workflow with error ${errorMessage}`); + } +} +``` + +### *New `@WorkflowEndItem` decorator for Workflows* + +The decorator is used to specify a custom workflow end item. + +#### Supported Parameters + +- `endMode` - End mode of the component, could be one of 0 or 1, where 0 is exit success and 1 is error. +- `exceptionVariable` - Exception variable that will hold the exception data when triggered. +- `businessStatus` - Value of the business status in the end component. + +Example: + +```typescript +import { Workflow, RootItem, WorkflowEndItem } from "vrotsc-annotations"; + +@Workflow({ + name: "Workflow End Exception", + path: "VMware/PSCoE", + description: "Workflow with root and end item with end mode 1", + attributes: { + errorMessage: { + type: "string", + }, + businessStatus: { + type: "string", + }, + endMode: { + type: "number", + }, + }, +}) +export class WorkflowEnd { + @RootItem() + public initiateWorkflow() { + // NOOP + } + + @WorkflowEndItem({ + endMode: 1, + exceptionVariable: "errorMessage", + businessStatus: "Bad", + }) + public workflowEnd() { + // NOOP + } +} +``` + +### *New `AsyncWorkflowItem` decorator for Workflows* + +The decorator is used to specify a canvas item that calls an asynchronous workflow. + +- `@AsyncWorkflowItem({target: "", linkedItem: "" })` + - `target` - The name of the next in line item. + - `linkedItem` - The ID of the workflow to call + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +#### Outputs + +Special output is needed for the AsyncWorkflowItem. + +- `wfToken` - {WorkflowToken} is required. The name **must** be `wfToken`. If this is missing an error is thrown. We don't check if the type is `WorkflowToken` but Aria Orchestrator will complain. + +#### Inputs + +No special inputs are needed for the AsyncWorkflowItem. + + +#### Example + +```typescript +import { Workflow, Out, In, Item, RootItem, AsyncWorkflowItem } from "vrotsc-annotations"; + +@Workflow({ + name: "Async Workflow Test", + path: "VMware/PSCoE", + description: "Calling another workflow asynchronously and binding values correctly", + attributes: { + waitingTimer: { + type: "Date" + }, + counter: { + type: "number" + }, + first: { + type: "number" + }, + second: { + type: "number" + }, + wfToken: { + type: "WorkflowToken" + } + } +}) +export class HandleNetworkConfigurationBackup { + @AsyncWorkflowItem({ + target: "printAsync", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" + }) + public asyncCall(@In first: number, @In second: number, @Out wfToken: WorkflowToken) { } + + @Item({ target: "callAsyncWf" }) + public prepareItems(@In @Out first: number, @In @Out second: number) { + first = 1; + second = 2; + } + + @Item({ target: "end" }) + public printAsync(@In wfToken: WorkflowToken) { + System.log(`Workflow token: ${wfToken.id} and state: ${wfToken.state}`); + System.log("Workflow finished"); + } + + @Item({ target: "prepareItems", exception: "" }) + @RootItem() + public start() { + System.log("Starting workflow"); + } +} +``` + +### *New `ScheduledWorkflowItem` decorator for Workflows* + +The new decorator gives you the ability to specify a canvas item that schedules a Workflow. + +- `@ScheduledWorkflowItem({target: "", linkedItem: "" })` + - `target` - The name of the next in line item. + - `linkedItem` - The ID of the workflow to schedule + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +#### Inputs + +Special input is needed for the ScheduledWorkflowItem. + +- `workflowScheduleDate` - {Date} is required. The name **must** be `workflowScheduleDate`. If this is missing an error is thrown. We don't check if the type is `Date` but Aria Orchestrator will complain. + +#### Outputs + +Special output is needed for the ScheduledWorkflowItem. + +- `scheduledTask` - {Task} is optional. If it's missing nothing will happen, if it's added, then the name **must** be `scheduledTask`. This is the task that is scheduled. + +#### Example + +```ts +import { Workflow, Out, In, Item, RootItem, DecisionItem, WaitingTimerItem, WorkflowItem, ScheduledWorkflowItem } from "vrotsc-annotations"; + +@Workflow({ + name: "Example Waiting Timer", + path: "VMware/PSCoE", + attributes: { + waitingTimer: { + type: "Date" + }, + counter: { + type: "number" + }, + first: { + type: "number" + }, + second: { + type: "number" + }, + result: { + type: "number" + }, + workflowScheduleDate: { + type: "Date" + }, + scheduledTask: { + type: "Task" + } + } +}) +export class HandleNetworkConfigurationBackup { + @DecisionItem({ target: "waitForEvent", else: "prepareItems" }) + public decisionElement(waitingTimer: Date) { + return waitingTimer !== null; + } + + @Item({ target: "callOtherWf" }) + public prepareItems(@In @Out first: number, @In @Out second: number, @In @Out workflowScheduleDate: Date) { + first = 1; + second = 2; + workflowScheduleDate = System.getDate("1 minute from now", undefined); + } + + @WorkflowItem({ + target: "print", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" + }) + public callOtherWf(@In first: number, @In second: number, @Out result: number) { + } + + + @Item({ target: "scheduleOtherWf" }) + public print(@In result: number) { + System.log("Result: " + result); + } + + @ScheduledWorkflowItem({ + target: "printScheduledDetails", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0" + }) + public scheduleOtherWf(@In first: number, @In second: number, @In workflowScheduleDate: Date, @Out scheduledTask: Task) { + } + + @Item({ target: "end" }) + public printScheduledDetails(@In scheduledTask: Task) { + System.log(`Scheduled task: ${scheduledTask.id}, [${scheduledTask.state}]`); + } + + @Item({ target: "decisionElement", exception: "" }) + public execute(@Out @In waitingTimer: Date, @Out @In counter: number): void { + if (!counter) { + counter = 0; + } + + counter++; + + if (counter < 2) { + const tt = Date.now() + 5 * 1000; + waitingTimer = new Date(tt); + } else { + waitingTimer = null; + } + + System.log("Counter: " + counter); + System.log("Waiting Timer: " + waitingTimer); + } + + @Item({ target: "execute", exception: "" }) + @RootItem() + public start() { + System.log("Starting workflow"); + } + + @WaitingTimerItem({ target: "execute" }) + public waitForEvent(@In waitingTimer: Date) { + } +} +``` + +### *New `WorkflowItem` decorator for Workflows* + +The new Decorator gives you the ability to specify a canvas item that calls a Workflow. + +- `@WorkflowItem({target: "", linkedItem: "" })` + - `target` - The name of the next in line item. + - `linkedItem` - The ID of the workflow to call + +In order to bind inputs and outputs, you do it with the `@In` and `@Out` decorators. This is the same way we do it for other items. + +Example: + +```typescript +import { + Workflow, + Out, + In, + Item, + RootItem, + DecisionItem, + WaitingTimerItem, + WorkflowItem, +} from "vrotsc-annotations"; + +@Workflow({ + name: "Example Waiting Timer", + path: "VMware/PSCoE", + attributes: { + waitingTimer: { + type: "Date", + }, + counter: { + type: "number", + }, + first: { + type: "number", + }, + second: { + type: "number", + }, + result: { + type: "number", + }, + }, +}) +export class HandleNetworkConfigurationBackup { + @DecisionItem({ target: "waitForEvent", else: "prepareItems" }) + public decisionElement(waitingTimer: Date) { + return waitingTimer !== null; + } + + @Item({ target: "callOtherWf" }) + public prepareItems(@In @Out first: number, @In @Out second: number) { + first = 1; + second = 2; + } + + @WorkflowItem({ + target: "print", + linkedItem: "9e4503db-cbaa-435a-9fad-144409c08df0", + }) + public callOtherWf( + @In first: number, + @In second: number, + @Out result: number + ) {} + + @Item({ target: "end" }) + public print(@In result: number) { + System.log("Result: " + result); + } + + @Item({ target: "decisionElement", exception: "" }) + public execute(@Out @In waitingTimer: Date, @Out @In counter: number): void { + if (!counter) { + counter = 0; + } + + counter++; + if (counter < 2) { + const tt = Date.now() + 5 * 1000; + waitingTimer = new Date(tt); + } else { + waitingTimer = null; + } + + System.log("Counter: " + counter); + System.log("Waiting Timer: " + waitingTimer); + } + + @Item({ target: "execute", exception: "" }) + @RootItem() + public start() { + System.log("Starting workflow"); + } + + @WaitingTimerItem({ target: "execute" }) + public waitForEvent(@In waitingTimer: Date) { + // NOOP + } +} +``` + +## Improvements + + + +### *`for each` statements are now being converted by `vropkg` when pulling* + +`for each` is valid syntax in the Java's Rhino engine, but not in normal JS. + +#### Previous Behavior + +When pulling a workflow with `for each` statements, the action would be pulled, but then would not be able to be pushed as the syntax is invalid. + +#### New Behavior + +`for each` statements are now being converted to `for` statements when pulling a workflow. + +Example: + +```js +var test = ["ya", "da"] + +for each (var i in test) { + for each (var y in test) { + System.log(y) + for each(var z in test){System.log(z)} + } + System.log(i) +} + +for each ( +var n in test +) { + System.log(n) +} + +for (var i in test) { + System.log(i) +} + +for (var $index in test) { + var i = test[$index] + System.log(i) +} +``` + +is converted to + + +```js +/** + * @return {string} + */ +(function() { + var test = ["ya", "da"] + + for (var $index_i in test) { + var i = test[$index_i]; + for (var $index_y in test) { + var y = test[$index_y]; + System.log(y) + for (var $index_z in test) { + var z = test[$index_z]; + System.log(z) + } + } + System.log(i) + } + + for (var $index_n in test) { + var n = test[$index_n]; + System.log(n) + } + for (var i in test) { + System.log(i) + } + + for (var $index in test) { + var i = test[$index] + System.log(i) + } +}); +``` + +### *ABX archetype build issue, cannot compile* + +Fixed an issue where the ABX archetype could not compile due to an old version of the `xmlbuilder2` package. + +#### Previous Behavior + +We were getting a build error when trying to compile the ABX archetype: + +```log +info: Error ts(1110) /root/vro/polyglot_test_project/node_modules/@types/node/crypto.d.ts (3569,17): Type expected. +info: Error ts(1005) /root/vro/polyglot_test_project/node_modules/@types/node/events.d.ts (105,28): ',' expected. +... +info: Error ts(1005) /root/vro/polyglot_test_project/node_modules/@types/node/util.d.ts (1763,26): ';' expected. +info: Error ts(1128) /root/vro/polyglot_test_project/node_modules/@types/node/util.d.ts (1765,1): Declaration or statement expected. +info: Exit status: 1 +info: Compilation complete +/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:123 + throw new Error('Found compilation errors'); + ^ + +Error: Found compilation errors + at NodejsStrategy.compile (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:123:19) + at NodejsStrategy. (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:52:18) + at Generator.next () + at fulfilled (/root/vro/polyglot_test_project/node_modules/@vmware-pscoe/polyglotpkg/dist/strategies/nodejs.js:5:58) +[ERROR] Command execution failed. +org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) + at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404) + at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166) +... + at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1136) + at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635) + at java.lang.Thread.run (Thread.java:840) +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD FAILURE +[INFO] ------------------------------------------------------------------------ +``` + +#### New Behavior + +The ABX archetype now compiles successfully. + +### Add missing classes to `o11n-plugin-aria` and add missing methods to the existing classes + +#### Previous Behavior + +Many classes are missing completely compared with vRO API and some existing classes were missing some methods + +#### Current Behavior + +The following classes were added to `o11n-plugin-aria`: + +- VraInfrastructureClient +- VraCloudAccountService +- VraUpdateCloudAccountVsphereSpecification +- VraCloudAccountVsphereSpecification +- VraRegionSpecification +- VraCloudAccountVsphere +- VraCloudZoneService +- VraZone +- VraHref +- VraZoneSpecification +- VraTag +- VraDataCollectorService +- VraRequestService +- VraRequestTracker +- VraBlockDevice +- VraBlockDeviceResult +- VraBlockDeviceSpecification +- VraConstraint +- VraChangeSecurityGroupSpecification +- VraNetworkInterfaceSpecification + +The following missing methods were added to the exist classes: + +- Class `VraHost` + - `destroy` + - `createInfrastructureClient` + +#### Related issue + + + +### Change default return Object of `Array.from()` Method to be empty array + +#### Previous Behavior + +In case the object type of the array-like Object does not match any of the expected types (e.g. is a Number) the default case of `Array.from()` returns a clone of the object. This does not match the desired behaviour according to the official documentation. + +```js +Array.from(10) // Output: 10 +``` + +#### Current Behavior +In case the object type of the array-like Object does not match any of the expected types (e.g. is a Number) the default case of `Array.from()` returns an empty array. + +```js +Array.from(10) // Output: [] +``` + +## Upgrade procedure + diff --git a/pom.xml b/pom.xml index 6dda1ce69..401d0d4e5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ ${project.basedir} - 2.40.1-SNAPSHOT + 2.41.0 diff --git a/typescript/npmconv/package-lock.json b/typescript/npmconv/package-lock.json index a1cf96e06..ef61d0ac2 100644 --- a/typescript/npmconv/package-lock.json +++ b/typescript/npmconv/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/npmconv", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/npmconv", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "license": "VMware Confidential", "dependencies": { "command-line-args": "^5.1.1", diff --git a/typescript/npmconv/package.json b/typescript/npmconv/package.json index 571b51961..23115a502 100644 --- a/typescript/npmconv/package.json +++ b/typescript/npmconv/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/npmconv", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "description": "Used for converting pure-typescript npm package to vRO project", "author": "VMware PSCoE", "license": "VMware Confidential", diff --git a/typescript/polyglotpkg/package-lock.json b/typescript/polyglotpkg/package-lock.json index cfd1f63f8..2dc8c5db5 100644 --- a/typescript/polyglotpkg/package-lock.json +++ b/typescript/polyglotpkg/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/polyglotpkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/polyglotpkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "license": "VMware Confidential", "dependencies": { "adm-zip": "^0.4.14", diff --git a/typescript/polyglotpkg/package.json b/typescript/polyglotpkg/package.json index 598cd4260..82936c029 100644 --- a/typescript/polyglotpkg/package.json +++ b/typescript/polyglotpkg/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/polyglotpkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "description": "Create a vRO Polyglot or serverless package", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/typescript/vro-scripting-api/package-lock.json b/typescript/vro-scripting-api/package-lock.json index 16dbb7923..9b99f0c58 100644 --- a/typescript/vro-scripting-api/package-lock.json +++ b/typescript/vro-scripting-api/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/vro-scripting-api", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/vro-scripting-api", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "license": "VMware Confidential", "devDependencies": { "@rollup/plugin-commonjs": "21.0.1", diff --git a/typescript/vro-scripting-api/package.json b/typescript/vro-scripting-api/package.json index 51b8dad91..e198d3ed5 100644 --- a/typescript/vro-scripting-api/package.json +++ b/typescript/vro-scripting-api/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/vro-scripting-api", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "VMware Confidential", "description": "vRO script API for NodeJS", diff --git a/typescript/vropkg/package-lock.json b/typescript/vropkg/package-lock.json index 4571fba93..95708acd6 100644 --- a/typescript/vropkg/package-lock.json +++ b/typescript/vropkg/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/vropkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/vropkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "bundleDependencies": [ "abstract-syntax-tree", "archiver", diff --git a/typescript/vropkg/package.json b/typescript/vropkg/package.json index 086149192..411772cf4 100644 --- a/typescript/vropkg/package.json +++ b/typescript/vropkg/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/vropkg", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "description": "Used to build vRealize Orchestrator signed package out of it source code (expand to package XML)", "author": "VMware PSCoE", "license": "VMware Confidential", diff --git a/typescript/vrotest/package-lock.json b/typescript/vrotest/package-lock.json index 70a11bc78..48fcc7ea5 100644 --- a/typescript/vrotest/package-lock.json +++ b/typescript/vrotest/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/vrotest", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/vrotest", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "bundleDependencies": [ "iconv-lite", "jasmine", diff --git a/typescript/vrotest/package.json b/typescript/vrotest/package.json index def6472f3..47c9983d7 100644 --- a/typescript/vrotest/package.json +++ b/typescript/vrotest/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/vrotest", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "VMware Confidential", "description": "vRO Test Suite for NodeJS", diff --git a/typescript/vrotsc/package-lock.json b/typescript/vrotsc/package-lock.json index 65d463fa9..10604ab1b 100644 --- a/typescript/vrotsc/package-lock.json +++ b/typescript/vrotsc/package-lock.json @@ -1,12 +1,12 @@ { "name": "@vmware-pscoe/vrotsc", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@vmware-pscoe/vrotsc", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "license": "VMware Confidential", "bin": { "vrotsc": "bin/vrotsc" diff --git a/typescript/vrotsc/package.json b/typescript/vrotsc/package.json index 270d76368..c50cae3cf 100644 --- a/typescript/vrotsc/package.json +++ b/typescript/vrotsc/package.json @@ -1,6 +1,6 @@ { "name": "@vmware-pscoe/vrotsc", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "VMware Confidential", "description": "vRO TypeScript to JavaScript transpiler", diff --git a/vro-types/ecmascript/package.json b/vro-types/ecmascript/package.json index 76a5b189b..956d96611 100644 --- a/vro-types/ecmascript/package.json +++ b/vro-types/ecmascript/package.json @@ -1,5 +1,5 @@ { "name": "@types/ecmascript", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "private": true } diff --git a/vro-types/jasmine/package.json b/vro-types/jasmine/package.json index 4bed082cc..ef21c2358 100644 --- a/vro-types/jasmine/package.json +++ b/vro-types/jasmine/package.json @@ -1,5 +1,5 @@ { "name": "@types/jasmine", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "private": true } diff --git a/vro-types/node/package.json b/vro-types/node/package.json index ab4df3803..61115fb3b 100644 --- a/vro-types/node/package.json +++ b/vro-types/node/package.json @@ -1,5 +1,5 @@ { "name": "@types/node", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "private": true } diff --git a/vro-types/o11n-core/package.json b/vro-types/o11n-core/package.json index 4d7489a71..48d94cc07 100644 --- a/vro-types/o11n-core/package.json +++ b/vro-types/o11n-core/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-core", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-activedirectory/package.json b/vro-types/o11n-plugin-activedirectory/package.json index 97c811e47..83d152a0e 100644 --- a/vro-types/o11n-plugin-activedirectory/package.json +++ b/vro-types/o11n-plugin-activedirectory/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-activedirectory", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-amqp/package.json b/vro-types/o11n-plugin-amqp/package.json index c2f81fa0a..18c9ebea2 100644 --- a/vro-types/o11n-plugin-amqp/package.json +++ b/vro-types/o11n-plugin-amqp/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-amqp", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-apic/package.json b/vro-types/o11n-plugin-apic/package.json index 5eac528a2..df8e5760d 100644 --- a/vro-types/o11n-plugin-apic/package.json +++ b/vro-types/o11n-plugin-apic/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-apic", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-aria/package.json b/vro-types/o11n-plugin-aria/package.json index 3ac7cf688..62a9bc1fc 100644 --- a/vro-types/o11n-plugin-aria/package.json +++ b/vro-types/o11n-plugin-aria/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-aria", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-azure/package.json b/vro-types/o11n-plugin-azure/package.json index d7013acd5..37cf8ce95 100644 --- a/vro-types/o11n-plugin-azure/package.json +++ b/vro-types/o11n-plugin-azure/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-azure", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-dynamictypes/package.json b/vro-types/o11n-plugin-dynamictypes/package.json index 138bdf7d4..d7b5cb660 100644 --- a/vro-types/o11n-plugin-dynamictypes/package.json +++ b/vro-types/o11n-plugin-dynamictypes/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-dynamictypes", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-mail/package.json b/vro-types/o11n-plugin-mail/package.json index 2dc16db4a..c00fd54b7 100644 --- a/vro-types/o11n-plugin-mail/package.json +++ b/vro-types/o11n-plugin-mail/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-mail", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-mqtt/package.json b/vro-types/o11n-plugin-mqtt/package.json index 9c2fb6254..cd4d4e12a 100644 --- a/vro-types/o11n-plugin-mqtt/package.json +++ b/vro-types/o11n-plugin-mqtt/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-mqtt", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-net/package.json b/vro-types/o11n-plugin-net/package.json index 6de6eb18f..78c31fcaf 100644 --- a/vro-types/o11n-plugin-net/package.json +++ b/vro-types/o11n-plugin-net/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-net", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-nsx/package.json b/vro-types/o11n-plugin-nsx/package.json index 486daca0f..73113e25f 100644 --- a/vro-types/o11n-plugin-nsx/package.json +++ b/vro-types/o11n-plugin-nsx/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-nsx", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-powershell/package.json b/vro-types/o11n-plugin-powershell/package.json index 4465a10c6..b02c6364a 100644 --- a/vro-types/o11n-plugin-powershell/package.json +++ b/vro-types/o11n-plugin-powershell/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-powershell", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-rest/package.json b/vro-types/o11n-plugin-rest/package.json index 69c9cf03e..7779b265b 100644 --- a/vro-types/o11n-plugin-rest/package.json +++ b/vro-types/o11n-plugin-rest/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-rest", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-snmp/package.json b/vro-types/o11n-plugin-snmp/package.json index c58a799c5..79f25923a 100644 --- a/vro-types/o11n-plugin-snmp/package.json +++ b/vro-types/o11n-plugin-snmp/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-snmp", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-soap/package.json b/vro-types/o11n-plugin-soap/package.json index 8b6176700..9a3148988 100644 --- a/vro-types/o11n-plugin-soap/package.json +++ b/vro-types/o11n-plugin-soap/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-soap", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-sql/package.json b/vro-types/o11n-plugin-sql/package.json index 4f01f81a9..60ea7ce23 100644 --- a/vro-types/o11n-plugin-sql/package.json +++ b/vro-types/o11n-plugin-sql/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-sql", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-ssh/package.json b/vro-types/o11n-plugin-ssh/package.json index 93ee4d9eb..30d668500 100644 --- a/vro-types/o11n-plugin-ssh/package.json +++ b/vro-types/o11n-plugin-ssh/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-ssh", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vapi/package.json b/vro-types/o11n-plugin-vapi/package.json index 0d3b5f16e..430697269 100644 --- a/vro-types/o11n-plugin-vapi/package.json +++ b/vro-types/o11n-plugin-vapi/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vapi", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vc/package.json b/vro-types/o11n-plugin-vc/package.json index 07ceff9db..3d890c3da 100644 --- a/vro-types/o11n-plugin-vc/package.json +++ b/vro-types/o11n-plugin-vc/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vc", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vcac/package.json b/vro-types/o11n-plugin-vcac/package.json index 96751a6cf..93cc6f392 100644 --- a/vro-types/o11n-plugin-vcac/package.json +++ b/vro-types/o11n-plugin-vcac/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vcac", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vcaccafe/package.json b/vro-types/o11n-plugin-vcaccafe/package.json index ffad65955..b7aee715e 100644 --- a/vro-types/o11n-plugin-vcaccafe/package.json +++ b/vro-types/o11n-plugin-vcaccafe/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vcaccafe", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vcloud/package.json b/vro-types/o11n-plugin-vcloud/package.json index 83e610071..58d43e5b8 100644 --- a/vro-types/o11n-plugin-vcloud/package.json +++ b/vro-types/o11n-plugin-vcloud/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vcloud", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-vco/package.json b/vro-types/o11n-plugin-vco/package.json index 189c433ed..f79dc95e6 100644 --- a/vro-types/o11n-plugin-vco/package.json +++ b/vro-types/o11n-plugin-vco/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-vco", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/o11n-plugin-xml/package.json b/vro-types/o11n-plugin-xml/package.json index a01b020bd..acd39031b 100644 --- a/vro-types/o11n-plugin-xml/package.json +++ b/vro-types/o11n-plugin-xml/package.json @@ -1,6 +1,6 @@ { "name": "@types/o11n-plugin-xml", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true diff --git a/vro-types/tslib/package.json b/vro-types/tslib/package.json index c1c2ebbcc..34e5b097c 100644 --- a/vro-types/tslib/package.json +++ b/vro-types/tslib/package.json @@ -1,6 +1,6 @@ { "name": "tslib", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "description": "TypeScript compiler requires that tslib library is installed as a NodeJS module. VRO is using separate implementation for tslib, so this library will just provide the types.", "license": "ISC", diff --git a/vro-types/vrotsc-annotations/package.json b/vro-types/vrotsc-annotations/package.json index faa6bc386..1ebaef917 100644 --- a/vro-types/vrotsc-annotations/package.json +++ b/vro-types/vrotsc-annotations/package.json @@ -1,6 +1,6 @@ { "name": "@types/vrotsc-annotations", - "version": "2.40.1-SNAPSHOT", + "version": "2.41.0", "author": "VMware PSCoE", "license": "ISC", "private": true