Skip to content

Commit

Permalink
Merge pull request #177 from vmware/IAC-789-vro-aria-automation-plugi…
Browse files Browse the repository at this point in the history
…n-inventory-types

IAC-789 new Aria Auto vRO Plugin  inventory Types
  • Loading branch information
vhagar91 authored Nov 14, 2023
2 parents d16df7c + 876f283 commit bfd1b07
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* [artifact-manager] IAC-788 / Improved Handling of Empty vRA Blueprint Versions for vRA 8.12.x.

### Enhancements
* [vro-types/o11n-plugin-aria] IAC-789 / Adding new Aria Automation Plugin vRO inventory Types
* [artifact-manager] IAC-786 / Set Aria Operations Default Policy vROPs 8.12.x.
* [artifact-manager] IAC-790 / Update usage of deprecated policy APIs for vROPs 8.12.x.
* [archetypes] IAC-797 / Improved content.yaml definition for "ts-vra-ng" and "vra-ng"
Expand Down
15 changes: 15 additions & 0 deletions docs/versions/latest/Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ default-policy: Policy Name
Then the 'Policy Name' will be set to the default policy in vROPs.
### Adding Aria Automation 8.x vRO Plugin Types
Developers can use on their TS projects the vRAHost type properties and functions
#### Relevant Documentation
NONE
#### Example
`example.ts`:
```typescript
export default function (vraHost:VraHost):VraGenericRestClient {
return vraHost.createRestClient();
}
```

[//]: # (Improvements -> Bugfixes/hotfixes or general improvements)
## Improvements
Expand Down
10 changes: 10 additions & 0 deletions vro-types/o11n-plugin-aria/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.o11n/
.vscode/
target
pom.xml
**/.DS_Store
package-lock.json
**/*.tgz
.settings/
.classpath
.project
75 changes: 75 additions & 0 deletions vro-types/o11n-plugin-aria/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* Specifies the object Type VRA:HOST.
*/
declare class VraHost {
readonly displayName: string;
readonly name: string;
readonly cloudHost: string;
readonly id: string;
readonly vraHost: string;
readonly sessionMode: string;
readonly connectionType: string;
readonly user: string;
/**
* Validates the Host Connection.
*/
validate(): boolean;

/**
* Creates a generic REST client for Automation Host
*/
createRestClient(): VraGenericRestClient;

}

declare class VraGenericRestClient {
readonly host: VraHost;

/**
* Method to execute rest operation by setting Request object. Request object can hold information (http method, resource url, request payload)
* @param restRequest
*/
execute(restRequest: VraRestRequest): VraRestResponse;

/**
* Method to create HTTP rest Request. It holds parameter (HTTP Method (GET/PUT/POST/DELETE/PATCH), Resource Path URI, Request Payload (Stringified JSON)).
* @param method
* @param path
* @param requestPayload
*/
createRequest(method: string, path: string, requestPayload: string): VraRestRequest;

}

declare class VraRestRequest {
readonly path: string;
readonly method: string;
readonly payload: string;

/**
* Sets Headers to the Http Request Object.
* @param key
* @param value
*/
setHeader(key: string,value:string): void;

/**
* Gets Http Header value for the key from the Http Request.
* @param header
*/
getHeader(header: string): string;
}

declare class VraRestResponse {
readonly contentAsString: string;
readonly allHeaders: { [key: string]: string };
readonly contentLength: number;
readonly statusMessage: string;
readonly statusCode: number;

/**
* Retrieves the server's response header values per header with specific name.
* @param headerName
*/
getHeaderValues(headerName: string): string;
}
7 changes: 7 additions & 0 deletions vro-types/o11n-plugin-aria/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@types/o11n-plugin-aria",
"version": "2.35.2-SNAPSHOT",
"author": "VMware PSCoE",
"license": "ISC",
"private": true
}
32 changes: 32 additions & 0 deletions vro-types/o11n-plugin-aria/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.vmware.pscoe.ts.types</groupId>
<artifactId>base-type</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>com.vmware.pscoe.ts.types</groupId>
<artifactId>o11n-plugin-aria</artifactId>

<properties>
<main.basedir>${project.parent.parent.basedir}</main.basedir>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
1 change: 1 addition & 0 deletions vro-types/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<module>o11n-plugin-vcloud</module>
<module>o11n-plugin-vco</module>
<module>o11n-plugin-xml</module>
<module>o11n-plugin-aria</module>
</modules>

<properties>
Expand Down

0 comments on commit bfd1b07

Please sign in to comment.