Code Monkey home page Code Monkey logo

vcd-ext-sdk's Introduction

Build Status

vcd-ext-sdk

ATTENTION: This repository soon will be Archived, please refer to our new central point repository for Cloud Director Extensibility Cloud Director Extension Standard Library

Overview

The vcd-ext-sdk is a set of templates for creating extensions to VMware vCloud Director. Service Providers looking to add custom service offerings to vCloud Director, can use these templates as a starting point to build new services. The templates captures best practices for API, Object and, UI extension development and are offered in Java, Javascript/Typescript/nodejs and, Python.

Documentation

See Cloud Developer Platform

Contributing

The vcd-ext-sdk project team welcomes contributions from the community. Before you start working with vcd-ext-sdk, please read our Developer Certificate of Origin. All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch. For more detailed information, refer to CONTRIBUTING.md.

License

BSD-2

vcd-ext-sdk's People

Contributors

aleksandrenko avatar cosmotron avatar dbyard-vmware avatar evanchsa avatar gdplouis avatar ilesev-vmw avatar irahov avatar jekill avatar jmoroski avatar johnnycuse avatar kirilkadoncheva avatar kvalenti avatar mslavov avatar nvladimirovi avatar pgenevv avatar power721 avatar sjones-vcd avatar stoychevl avatar tsimchev avatar vilianvenkov avatar vmwsrpbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcd-ext-sdk's Issues

Theme-generator yarn build issue. Please help.

When I run yarn in the theme-generator on a Windows PC and a Mac I get an error:

I spent considerable time trying to solve this in Windows and I determined that it was that node-sass is not supported on on Windows 64-bit. So, I'm perplexed now why I would get almost the exact same error on Mac:

Randells-Mac-mini:theme-generator randellhynes$ yarn
yarn install v1.5.1
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > [email protected]" has unmet peer dependency "@webcomponents/custom-elements@^1.0.0".
[4/4] 📃 Building fresh packages...
[1/1] ⠐ node-sass: AttributeError: 'NoneType' object has no attribute 'groups'
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
error An unexpected error occurred: "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass: Command failed.
Exit code: 1
Command: sh
Arguments: -c node scripts/build.js
Directory: /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass
Output:
Building: /usr/local/bin/node /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/local/bin/python2
gyp verb check python version /usr/local/bin/python2 -c \"import platform; print(platform.python_version());\" returned: "2.7.15
"
gyp verb get node dir no --target version specified, falling back to host node version: 10.14.2
gyp verb command install [ '10.14.2' ]
gyp verb install input version string "10.14.2"
gyp verb install installing version: 10.14.2
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.14.2
gyp verb build dir attempting to create "build" dir: /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/randellhynes/.node-gyp/10.14.2/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/randellhynes/.node-gyp/10.14.2',
gyp info spawn args '-Dnode_gyp_dir=/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/randellhynes/.node-gyp/10.14.2/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Traceback (most recent call last):
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/gyp_main.py", line 16, in
sys.exit(gyp.script_main())
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 545, in script_main
return main(sys.argv[1:])
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 538, in main
return gyp_main(args)
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 523, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
part_of_all=qualified_target in needed_targets)
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
self.Pchify))
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
cflags = self.xcode_settings.GetCflags(configname)
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/randellhynes/Documents/Projects/vcd-ext-sdk-master/ui/theme-generator/node_modules/node-sass
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

yarn package installation fails in vcd-plugin-seed

Describe the bug
attempting to run yarn within the vcd-plugin-seed folder fails and generates the error below.

➜ yarn
yarn install v1.12.3
[1/4] Resolving packages...
error Package "" refers to a non-existing file '"/mnt/c/Users/mike.garuccio/code/vcd-ext-sdk/ui/api-client/packages/bindings/dist"'.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

To Reproduce
Steps to reproduce the behavior:

  1. clone the package from github
  2. cd into vcd-ext-sdk/ui/vcd-plugin-seed
  3. run yarn
  4. See error

Expected behavior
packages to successfully install

Desktop (please complete the following information):

  • OS: Ubuntu 1804 within Win10 WSL
  • Browser: n/a
  • Version: latest

Additional context
tried both within Windows Subsystem for Linux and natively within Windows 10 with the same error on both attempts. also tried cloning the package again with no luck.

Unable to support Jasmine and Karma for unit testing in VCD extension

Describe the bug
I want to perform unit testing in my VCD extension plugin. I've installed Jasmine and Karma for setup but after installing all the dependencies it is opening a blank karma testing window on the browser and throwing an error on the console:

Connected on socket 8TIusdsQXB9D4V0vAAAA with id 66637214
Firefox 109.0.0 (Windows 10.0.0): Executed 0 of 0 ERROR (0.001 secs / 0 secs)
- OS: Windows 10
- BrowsChromerome, Firefox (Latest as well older versions)
- Version: Chrome: 109.0.5414.75, Firefox: 100.0 to 109.0 
- angular/cli: 9.1.12
-jasmine-core: ^4.5.0
- karma: ^6.4.1

To Reproduce
Steps to reproduce the behavior:

  1. Checkout or create new vcd-ext emulator UI plugin
  2. Run ng test
  3. See error
    Executed 0 of 0 ERROR (0.001 secs / 0 secs)

Expected behavior
Expected behavior is to run the custom unit test cases and display output on the karma browser screen after running ng test command.

Screenshots
karma, testing screen
console Error for karma
dev dependencies

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
If VCD is not supporting Jasmine/karma, Please help me to know about other unit testing tool?

vCloud development mode

Hello,

it is possible to run vCloud 9.1 in development mode?

Actually I cant debug my custom plugin and load map files. For example Augury add-on for chrome says:
"This application is running in production mode and therefore cannot be inspected using Augury."

So is any magic option in global.settings to run vcloud 9.1 in development mode ?

SDK logs

We are running in a problem with extension SDK. We don't see the plugin in the portal.

Are there any logs for the SDK and where can we find them?

[@vcd/sdk] Should not specify the same package in both places: dependencies and peerDependencies

Describe the bug
Currently, the @vcd/sdk specifies the following

"dependencies": {
"@vcd/angular-client": "0.0.2-alpha.6"
},
"peerDependencies": {
"@vcd/angular-client": "0.0.2-alpha.6",

But those two contradicts.
"dependencies" - means 'I depend on this package and I will install it'
"peerDependencies" - means 'I depend on this package but I will not install it, I expect it is already installed'

After saving using the Atom editor, the built and deployed plugin will no longer function.

Describe the bug
When saving using the Atom editor, Atom automatically creates 2 files for each XX.ts file: XX.js and XX.js.map. When those files are present, the "yarn run deploy" process incorporates those files into the bundle.js file. Next, when the plugin is deployed to the vCD environment, it will fail with an error.

To Reproduce
Steps to reproduce the behavior:

  1. Open Atom
  2. Make a changes to any .ts file and then save it. Notice: Atom will create two new files in the same directory, X.js and X.js.map.
  3. Run yarn run build. Notice: the contents of X.js will mostly be inside the dist/bundle.js file.
  4. Deploy the plugin in a vCD environment, using yarn run deploy.
  5. Load the vCD environment and open the developer tools. Notice: there is an error saying "Could not load external extensions. Error: No ResourceLoader implementation has been provided. Can't read the url 'XX.html'"

Expected behavior
Files saved using Atom should be ignored by the rollup process.

Screenshots
image

Desktop (please complete the following information):

  • OS: High Sierra
  • Browser: chrome, firefox

Additional context
Adding "outDir": "build", to the compilerOptions in the tsconfig.json file seemed to fix the issue.

[@vcd/ext-cli] Building a plugin with lerna does not show compilation errors

Describe the bug
Building the plugin with lerna does not show compilation errors

To Reproduce
Steps to reproduce the behavior:

  1. Create a new plugin vcd-ext new https://vmware.github.io/vcd-ext-sdk/docs/ui_plugins/getting_started
  2. Make some changes in plugin itself that result in compilation error.
  3. Run npm run build in the top folder that is using "build": "lerna run build",
    Observed: there is no compilation error although there is such
    Expected: compilation error to be shown
  4. Navigate to the plugin cd packages/YOUR_PLUGIN_NAME
  5. Run npm run build
    Observed: the compilation error is shown
    Expected behavior
    A clear and concise description of what you expected to happen.

[@vcd/ext-cli] Auto-generated plugin should not have memory leaks

Describe the bug
The autogenerated plugin does not unsubscribe from an observable subscription

To Reproduce
Steps to reproduce the behavior:

  1. Create a new plugin vcd-ext new ...
  2. Take a loook at the autogenerated code:
    this.client.query(Query.Builder.ofType("organization").links(false)).subscribe
    There is no unsubscribe statement.
    Although this is a demo code and most probably it is going to be replaced by the plugin writer it is not goot to suggest code with memory leaks.
    There should be either unsubscribe or pipe(take(1)) statement

Unsupported import syntax in 'VcdApiClient'

Describe the bug
When I run ng serve/build --prod for cloud-director-container (https://github.com/vmware-samples/vcd-ext-samples/tree/developer-container/9.7-10.0) for plugin (where I use @vcd/[email protected]).

I set Angular 6.1.0 and Clarity 0.13.11 in package.json

there is an error in console and the app is failed to compile.
ERROR in ../../plugin/src/main/my-plugin.module.ts(45,17): Error during template compile of 'MyPluginModule'
Unsupported import syntax in 'VcdApiClient'
'VcdApiClient' contains the error.

To Reproduce
Steps to reproduce the behavior:

  1. clone the repo cloud-director-container (https://github.com/vmware-samples/vcd-ext-samples/tree/developer-container/9.7-10.0)
  2. Prepare to build
  3. ng build --prod
  4. See error in console (where you building)
    ERROR in ../../plugin/src/main/my-plugin.module.ts(45,17): Error during template compile of 'MyPluginModule'
    Unsupported import syntax in 'VcdApiClient'
    'VcdApiClient' contains the error.

Expected behavior
Correct building of the application without VcdApiClient errors.

Edit:
tsconfig.json
...
"compilerOptions": {
"target": "ES5",
"module": "ESNext"
...

in file: node_modules/@vcd/sdk/main.d.ts
import VcdApiClient = client.VcdApiClient; -> I think this is the cause of the error

So, I change import, and now I have:

import { VcdApiClient } from '@vcd/sdk/client'; -> can I do this?
import { VcdSdkModule } from '@vcd/sdk';

in my-plugin.module.ts

But I have still a problem with build:

ERROR in Unexpected value 'undefined' exported by the module 'VcdSdkModule in (...)node_modules/@vcd/sdk/vcd-sdk.d.ts'

Could someone please help me resolve the problem?
I'll be very grateful.

Cannot build a plugin after upgrading to angular@11

Describe the bug
Cannot build a plugin after an upgrade to angular@11.
Got an error:
[error] TypeError: browser_1.buildBrowserWebpackConfigFromContext is not a function

To Reproduce
Steps to reproduce the behavior:

  1. Create a new plugin vcd-ext new https://vmware.github.io/vcd-ext-sdk/docs/ui_plugins/getting_started
  2. Upgrade angular from v9 the preinstalled one to v11
    npx ng update --force @angular/core@11 @angular/cli@11
  3. Run npm run build, See error
[error] TypeError: browser_1.buildBrowserWebpackConfigFromContext is not a function
    at /Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@vcd/plugin-builders/base/index.js:52:41
    at Generator.next (<anonymous>)
    at /Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@vcd/plugin-builders/base/index.js:13:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@vcd/plugin-builders/base/index.js:9:12)
    at commandBuilder (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@vcd/plugin-builders/base/index.js:47:12)
    at onInput (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/src/create-builder.js:150:30)
    at SafeSubscriber._next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/src/create-builder.js:64:29)
    at SafeSubscriber.__tryOrUnsub (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:143:22)
    at Subscriber._next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:89:26)
    at Subscriber.next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:66:18)
    at Object.next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/observable/onErrorResumeNext.js:22:49)
    at SafeSubscriber.__tryOrUnsub (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:205:16)
    at SafeSubscriber.next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:143:22)
    at Subscriber._next (/Users/irahov/workspace/vmware-gitlab/IrTestSolution/packages/irUiPlugin/node_modules/@angular-devkit/architect/node_modules/rxjs/internal/Subscriber.js:89:26)

** Expected**
There should be clear info about angular the dependencies or (maybe even better) @vcd/ext-cli version per vcd release

Documentation

Where can I find some documentation of this sdk (Angular)?

  • What is it providing (exporting)?
  • How to use certain elements like the Query.Builder
  • Etc.

VcdApiClient.get returns inconsistent responses in 9.1 vs 9.5

Describe the bug
Currently using VcdApiClient.get to determine a list of API Versions available however, in response the format is different making handling data more difficult.

To Reproduce
Using the following line will return a different JSON Body:
return this.vcdApi.get('api/versions').pipe(map resp=> {console.log(resp)})

In 9.1 we see the format of the body as:

  "name" : "{http://www.vmware.com/vcloud/versions}SupportedVersions",
  "declaredType" : "com.vmware.vcloud.api.rest.schema.versioning.SupportedVersionsType",
  "scope" : "javax.xml.bind.JAXBElement$GlobalScope",
  "value" : {
    "versionInfo" : [ {
      "version" : "5.5",
      "loginUrl" : "https://<vcd-cell-redacted>/api/sessions",
      "mediaTypeMapping" : [ {
        "mediaType" : "application/vnd.vmware.vcloud.error+xml",
        "complexTypeName" : "ErrorType",
        "schemaLocation" : "http://<vcd-cell-redacted>/api/v1.5/schema/common.xsd",
        "any" : [ ],
        "otherAttributes" : { }
      },

in 9.5, we see the following:

{
  "versionInfo" : [ {
    "version" : "20.0",
    "loginUrl" : "https://<vcd-cell-redacted>/api/sessions",
    "mediaTypeMapping" : [ ],
    "any" : [ ],
    "deprecated" : true,
    "otherAttributes" : { }
  },

No type information is displayed in 9.5.

When handling the response and reading it's length, we need to handle 9.1 with a value entry and without for 9. This also applies for reading any of response body:

9.1 - resp['body']['value']['versionInfo'].length
9.5 - resp['body']['versionInfo'].length

Expected behavior
Bodies should be consistent since we're using the same SDK for both versions of vCloud Director.

Desktop (please complete the following information):

  • OS: [Mac OSX]
  • Browser [Chrome]
  • Version [30.0 and 31.0]

Multiple arguments doesn't work in TranslateService

Describe the bug
Multiply arguments doesn't work in TranslateService, it regards all the arguments as a single array.

To Reproduce
Steps to reproduce the behavior:

  1. Define i18n key with multiply parameters. e.g.:
"duration": "{0} hours {1} minutes"
  1. Call TranslateService with multiply arguments. e.g.: TranslateService.get("duration", 12, 30)
  2. The result is "12,30 hours minutes", it should be "12 hours 30 minutes".
  3. There is another possible issue in the function getParsedResult():
    TranslateService.get("duration", 0, 30) won't work as expected .
        return !result ? `#${key}#` : result.replace(/{([0-9]+)}/g, (_, ...n) => {
            const idx = parseInt(n[0]);
            if (args && args[idx]) {  // It's false if the value is number 0.
                return args[idx];
            }

            return '';
        });

Expected behavior
The result text should be "12 hours 30 minutes".

Possible solution
Use spread operator in function get().

return Observable.of(this.getParsedResult(key, ...args));
// ...
result = this.getParsedResult(key, ...args);

Desktop (please complete the following information):

  • Version [0.9.0]

Missing java.header file

Describe the bug
On a fresh clone of the repo, in the java/api-schemas dir, I am trying to run "mvn install"

It fails with:
Downloaded from repo.jenkins-ci.org: http://repo.jenkins-ci.org/public/com/puppycrawl/tools/checkstyle/6.18/checkstyle-6.18.jar (1.2 MB at 539 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] api-schemas-parent :: vCloud Director REST API Schemas parent 1.0.0 FAILURE [ 9.385 s] [INFO] extensibility-api-schemas :: Object Extensibility API schemas 9.1.0 SKIPPED [INFO] vcd-xjc-plugins :: Custom plugins for XML to Java Compilation 1.0.0 SKIPPED [INFO] extensibility-api-bindings :: Object Extensibility API bindings 9.1.0 SKIPPED [INFO] openapi-schemas :: vCloud Director OpenAPI Definitions 9.1.0 SKIPPED [INFO] rest-api-schemas :: vCloud Director REST API schemas 9.1.0 SKIPPED [INFO] rest-api-bindings :: vCloud Director REST API bindings 9.1.0 SKIPPED [INFO] rest-api-client :: vCloud Director REST Client 9.1.0 SKIPPED [INFO] bindings-generator :: vCloud Director bindings generator 1.0.0 SKIPPED [INFO] binding-plugin Maven Mojo 1.0.0 .................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 9.661 s [INFO] Finished at: 2018-11-07T10:51:05+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (validate) on project api-schemas-parent: Failed during checkstyle configuration: cannot initialize module RegexpHeader - Unable to find: src/main/checkstyle/java.header -> [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

I can continue by skipping the style check with mvn install -Dcheckstyle.skip

Missing locale data for the locale "fr" for the DatePipe error

Describe the bug
The customer is getting this issue on using the French language on the VCD extension plugin v2. This is a kind of intermittent issue. I am not facing the same on my environment but trying to fix the same.

To Reproduce
Steps to reproduce the behavior:

  1. Set your Chrome browser language as French
  2. In the VCD extension
  3. Open the plugin Data Management V2 and connect to the CDM endpoint and open Reports (Rapports);
  4. It gives the error.

I am trying to resolve the same. I added the following code on AppModule, but this change doesn't let the plugin install on VCD.

import localeFr from '@angular/common/locales/fr'; registerLocaleData(localeFr);

 providers: [
    { provide: LOCALE_ID, useValue: navigator.language },

Also added the pipes this way, still no luck
{{ snapshot.date | date: 'medium':undefined:locale }}

Expected behavior
The data should be visible in French locale, for date and percentage fields without giving such console errors.

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome

Additional context
I think we need to add some imports in the root main module.

Migrate to NX

This is possible to migrate this project from lerna monorepo to nx monorepo in the future?
I think it's better to maintain and support in nx projects.

Eventually, this is possible to create a new project via nx workspace and implement vcd-ext?

Plugins using @vcd/bindings fail to load in IE11

When a user has uploaded a UI plugin and opens the environment in IE11, the vCloud Director H5 portals are not usable any more and plugins are not listed in main navigation.

To Reproduce

  1. Upload one or more plugins and open the environment in IE11.
  2. Observe missing plugins and console errors

Expected behavior
All plugins should be shown in the main navigation and should be accessible.

Screenshots
image

Additional context
This seems to be caused by the fact that the generated code for the binding is emitting ES6, using the class keyword that does not work in IE11.

Karma fails to test SDK due to sandbox issues

Describe the bug
Using webpack 4.22.0 to compile the SDK, during "test:sdk" stage, we see the following errors:

webpack: Compiled successfully.
�[32m08 01 2019 16:52:43.881:INFO [karma]: �[39mKarma v1.6.0 server started at http://0.0.0.0:9876/
�[32m08 01 2019 16:52:43.881:INFO [launcher]: �[39mLaunching browser ChromeHeadless with unlimited concurrency
�[32m08 01 2019 16:52:44.202:INFO [launcher]: �[39mStarting browser ChromeHeadless
�[36m08 01 2019 16:52:44.203:DEBUG [temp-dir]: �[39mCreating temp dir at /tmp/karma-53100854
�[36m08 01 2019 16:52:44.206:DEBUG [launcher]: �[39m/var/lib/jenkins/workspace/vCD/vcd-ext-sdk/ui/api-client/packages/sdk/node_modules/puppeteer/.local-chromium/linux-499413/chrome-linux/chrome --user-data-dir=/tmp/karma-53100854 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling --disable-renderer-backgrounding --disable-device-discovery-notifications http://localhost:9876/?id=53100854 --headless --disable-gpu --remote-debugging-port=9222
�[36m08 01 2019 16:52:44.622:DEBUG [launcher]: �[39mProcess ChromeHeadless exited with code 1
�[31m08 01 2019 16:52:44.623:ERROR [launcher]: �[39mCannot start ChromeHeadless
	[0108/165244.290520:FATAL:zygote_host_impl_linux.cc(123)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

To Reproduce
Build the SDK

Expected behavior
Testing to pass and SDK to compile successfully.

Desktop (please complete the following information):

  • OS: [CentOS 7.9]

Additional context
This can be fixed by adding the following to Karma.conf.js:

        customLaunchers: {
        ChromeHeadlessNoSandbox: {
            base: 'ChromeHeadless',
            flags: ['--no-sandbox']
              }
        },

"yarn run build" is failing with vcd-plugin-seed project with TS2304: Cannot find name 'VcdApiClient' and 'ApiResultService'

When running yarn run build, it fails with the following:
ERROR in [at-loader] ./node_modules/@vcd/sdk/index.d.ts:7:10
TS2304: Cannot find name 'VcdApiClient'.

ERROR in [at-loader] ./node_modules/@vcd/sdk/index.d.ts:7:24
TS2304: Cannot find name 'ApiResultService'.
error Command failed with exit code 2.

To Reproduce
git vcd-plugin-seed
yarn
yarn run build

Multiple attempts on different systems present the same issue

Expected behavior
Successfully build

Screenshots
See attached
yarn-run-build

Desktop (please complete the following information):

  • OS: [e.g. iOS]: Photon 2.0
  • Browser [e.g. chrome, safari]: N/A
  • Version [e.g. 22]: N/A

Additional context
Add any other context about the problem here.

Query filters using .and() or .or() with multiple arguments fails

Describe the bug
Trying to use a .and() filter with multiple arguments, such as this fails:

    let builder = new Filter.Builder();
    let filter = builder
      .and(
        builder.is(QueryResultOrgRecordType.Fields.IS_ENABLED).equalTo(true),
        builder.is(QueryResultOrgRecordType.Fields.NAME).like('gold', Filter.MatchMode.START)
      ).query();

    let queryRequest = Query.Builder
      .ofType('organization')
      .filter(filter);

Browser error:

vendor.bundle.js:429 ERROR TypeError: builder.and(...).query is not a function
at SimpleComponent.ngOnInit (bundle.js:20026)
at checkAndUpdateDirectiveInline (vendor.bundle.js:513)
at checkAndUpdateNodeInline (vendor.bundle.js:548)
at checkAndUpdateNode (vendor.bundle.js:548)
at prodCheckAndUpdateNode (vendor.bundle.js:548)
at Object.eval [as updateDirectives] (SimpleComponent_Host.ngfactory.js:9)
at Object.updateDirectives (vendor.bundle.js:548)
at checkAndUpdateView (vendor.bundle.js:548)
at callViewAction (vendor.bundle.js:548)
at execEmbeddedViewsAction (vendor.bundle.js:548)


Same is true when using .or() with multiple arguments:

   let builder = new Filter.Builder();
   let filter = builder
     .or(
       builder.is(QueryResultOrgRecordType.Fields.NAME).like(‘gold’, Filter.MatchMode.START),
       builder.is(QueryResultOrgRecordType.Fields.NAME).like(‘silver, Filter.MatchMode.START)
     ).query();

    let queryRequest = Query.Builder
      .ofType('organization')
      .filter(filter);

Browser error:

vendor.bundle.js:429 ERROR TypeError: builder.or(...).query is not a function
at SimpleComponent.ngOnInit (bundle.js:20026)
at checkAndUpdateDirectiveInline (vendor.bundle.js:513)
at checkAndUpdateNodeInline (vendor.bundle.js:548)
at checkAndUpdateNode (vendor.bundle.js:548)
at prodCheckAndUpdateNode (vendor.bundle.js:548)
at Object.eval [as updateDirectives] (SimpleComponent_Host.ngfactory.js:9)
at Object.updateDirectives (vendor.bundle.js:548)
at checkAndUpdateView (vendor.bundle.js:548)
at callViewAction (vendor.bundle.js:548)
at execEmbeddedViewsAction (vendor.bundle.js:548)

To Reproduce
Steps to reproduce the behavior:

  1. Use code listed above
  2. Log in to browser and then go to the browser console. Error will appear.

Expected behavior
I would like to be able to pass in as many arguments as desired to the .or() and .and() methods and have filter builder generate the proper syntax.

Additional context
Oddly enough, it works properly with the following code:

   let builder = new Filter.Builder();
   let filter = builder
     .is(QueryResultOrgRecordType.Fields.IS_ENABLED).equalTo(true).and().or(
       builder.is(QueryResultOrgRecordType.Fields.NAME).like(‘%aaaa’, Filter.MatchMode.START),
       builder.is(QueryResultOrgRecordType.Fields.NAME).like(‘org’, Filter.MatchMode.START)
     ).query();

    let queryRequest = Query.Builder
      .ofType('organization')
      .filter(filter);

VcdApiClient returns empty data with System Admin role

Describe the bug
VcdApiClient returns empty data with System Admin.
If with Org Admin, the returned data are correct.

To Reproduce
Steps to reproduce the behavior:
(vCD 9.7)

  1. Login to /provider portal using System Admin account
  2. Open Tenant portal from Organizations grid link
  3. Make a call to API using VcdApiClient
  4. The response is 200 OK yet with empty 'record' field

Please see attached image showing different data with identical request URL.
returned-data-comparison

Expected behavior
VcdApiClient returns same data for System Admin and Org Admin roles

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version @vcd/[email protected], vCloud 9.7, API Version=31.0

Additional context
None

Allow sorting in queries

Is your feature request related to a problem? Please describe.
I would like to have the ability to sort the result when using queries in the api-client.

Describe the solution you'd like
Add the sortAsc and sortDesc parameters to the list of available parameters.

npm run start breaks and shows unexpected error after login vcd as a tenant user

Describe the bug
Hi team, I followed the doc https://vmware.github.io/vcd-ext-sdk/docs/ui_plugins/getting_started and used vcd-ext to create a new uiPlugin(no new code added, just like seed project). I encountered an error when exec npm run start after logining vcd as an org user(I mean, normal tenant user, not system user).
Meanwhilte it works fine if I login as a system user.
I've checked the https://vmware.github.io/vcd-ext-sdk/docs/ui_plugins/emulator for the details but can't find out what happened. Do you have any idea of it?

To Reproduce
Steps to reproduce the behavior:
0. Use node-v12.16.3

  1. npm install -g @vcd/[email protected]
  2. vcd-ext new
  3. ...follow the steps and check the uiPlugin option, press enter
  4. installing dependencies without any error

Or, you can vcd-ext new a clean repo, login as a tenant user and reproduce the error easily.

Expected behavior
npm run start without any error(login as both tenant user or admin)

Screenshots
npm run start(successfully using admin user)
image

npm run start(has errors using tenant user)
image

Error message detail
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/lujin/dev/vmw/vcd-tds/frontend/node_modules/.bin:/Users/lujin/opt/anaconda3/bin:/Users/lujin/opt/anaconda3/condabin:/Users/lujin/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin:/Users/lujin/Documents/dev/android-sdk-macosx/tools:/Users/lujin/Documents/dev/android-sdk-macosx/platform-tools:/Users/lujin/dev/mongodb-4.0.5/bin:/Users/lujin/dev/flutter/bin 9 verbose lifecycle [email protected]~start: CWD: /Users/lujin/dev/vmw/vcd-tds/frontend 10 silly lifecycle [email protected]~start: Args: [ '-c', 'vcd-ext serve' ] 11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start: vcd-ext serve13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:310:20) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:310:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid [email protected] 15 verbose cwd /Users/lujin/dev/vmw/vcd-tds/frontend 16 verbose Darwin 20.6.0 17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start" 18 verbose node v12.16.3 19 verbose npm v6.14.4 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] start:vcd-ext serve22 error Exit status 1 23 error Failed at the [email protected] start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

Desktop (please complete the following information):

  • OS: darwin-x64
  • Node v12.16.3

Additional context
I've tried downgraded to @vcd/ext-cli/0.0.13-beta.4 or lower, it doesn't work either.

No code change actually, you could exec vcd-ext new a clean repo to reproduce it EASILY.

Plese let me know if anything useful I can provide.
Thank you team, again!

SESSION_ORGANIZATION injected with incorrect letter case

Describe the bug
The Org name contains both upper and lower cased letters.
Enter Tenant Portal with all-lower-cased org name in the URL.
The plugin will get SESSION_ORGANIZATION injected from container as in an all-lower-cased form.

To Reproduce
Steps to reproduce the behavior:

  1. Create an Org with mixed-cased name, say 'Org_Test'
  2. Open browser with URL as 'https//vcloud-server/tenant/org_test'
  3. Verify the injected SESSION_ORGANIZATION value to be as 'org_test'

Expected behavior
Expect it to be 'Org_Test'

Desktop (please complete the following information):

  • OS: [Windows 10]
  • Browser [chrome]
  • @vcd/sdk Version [0.11.0]
  • vCloud Director Version [10.0]

Additional context
N/A

how to build the api-client after March 2019

Back in Feb 2019 I successfully got this working.
However trying on a fresh system today I cannot get past

cd ../ui/api-client
mvn generate-sources

as there is no longer a pom.xml in the api-client directory. I assumed I had missed a step but can't see what.

Getting strict MIME type error in lazy loading the modules in UI Plugin in production mode

Description
I implemented Angular Lazy Loading of modules in the new vcd-ext emulator UI plugin, it’s working fine in the local development mode, however, it’s failing in the production mode inside VCD, I packaged the build and imported it as an extension in VCD. It’s producing the following error on the navigation:

Refused to execute script from ' its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.js?t=17855680:1 ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk 1 failed.

Does VCD-EXT support lazy loading of the modules?

When I package the plugin, it produces multiple bundle.js files for lazy loaded modules, when I navigate to any component, it requests for that specific {}.bundle.js file with content type text/html, for other bundle.js file, it takes
Response-Headers: Content-Type: : application/javascript
Is there a way to change the Content-Type for lazy loaded bundle files too?

To Reproduce
Steps to reproduce the behavior:

  1. Import the plugin

  2. Go to plugin

  3. Click on Home -> Dashboard

  4. See error on console
    Refused to execute script from 'https:/1.bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. main.js?t=17855680:1 ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk 1 failed.

Expected behavior
It should be able to load home as well as dashboard module bundle correctly.

Desktop (please complete the following information):

  • OS: Windows
  • Browser : chrome, safari

Additional context
Add any other context about the problem here.

@vcd/sdk uses an API version that is incompatible with vCloud Director 9.1

Describe the bug
Using an unaltered version of the vcd-plugin-seed template to test the vCD Extensibility Plugin, the plugin builds successfully and deploys. However, the tenant name and username are supposed to be present on the created webpage. Instead, blank spaces are seen instead of text (see screenshot). I tested with Chrome and Safari and saw the same issue.

image

To Reproduce
Steps to reproduce the behavior:

  1. Followed Build instructions for vcd-plugin-seed
  2. Used automated deploy with: yarn run deploy
  3. Login to vCD as tenant and checked plugin
  4. See screenshot above for what I see.

Expected behavior
As seen on vKelby post, this is what should display:

image

Desktop (please complete the following information):

  • OS: MacOS Mojave
  • Browser: Chrome Version 70.0.3538.110 (Official Build) (64-bit)
  • Version: vCD 9.1.2

SDK for other languages

The templates captures best practices for API, Object and, UI extension development and are offered in Java, Javascript/Typescript/nodejs and, Python.

Regarding the line above in the readme, I can only find the JAVA SDK. Where can I find the SDKs for the other languages?

VcdHttpClient overwrites user-provided Accept headers

While issuing a Http request with custom headers, VcdHttpClient overwrites user-provided Accept headers.

Sample code:
getPacFileForSddc(): Observable {
const httpOptions = {
headers: new HttpHeaders({
'Accept': 'application/x-ns-proxy-autoconfig',
responseType: 'text'
})
};
return this.vcdHttpClient.get(${myURL}, httpOptions);
}

Allow a provider to make API calls "as a" specific tenant

Is your feature request related to a problem? Please describe.
Currently unable to read the response entirely from HTTPClient, the body returns but not the headers.

Describe the solution you'd like
In VcdApiClient.prototype.get, can we include HTTPClient options to observe the response e.g.:

return this.http.get(this._baseUrl + "/" + endpoint, { observe: 'response' });

VCD login shouldn't be required for running emulated environment

Description
If I want to create a simple proof of concept plugin using vcd-ext new and then test it in a local sandbox via the vcd-ext serve command, I shouldn't need to first log into a real VCD instance.

One of the selling points of the local emulated environment is that it provides an alternative to a live environment for tighter feedback loops and general sandboxing of plugins without provider credentials

To Reproduce
Steps to reproduce the behavior:

  1. Install the latest vcd-ext
  2. Run vcd-ext new demo
  3. Run 'vcd-ext serve`
  4. See error
~/code/Demo$ vcd-ext serve
    Error: Config file missing at /home/jmoroski/.vcd/config. Try logging in first.

Expected behavior
A running emulated environment

Support webpack for building plugins

The current build process in place for building plugins uses rollup.js. This process relies heavily on various plugins in various stages of support. Plugins like node resolver have been buggy in their handling of non-es2016 modules and require other plugins like commonjs to get to a 'working' state.

Webpack is mature and active, and it is a widely used and supported tool that should be able to effectively handle all our imported node modules, and allow the other build aspects to function in a less fragile way.

Update metadata key fail with "abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information"

Describe the bug
Trying to set a metadata key fail with the following error:

"[ 61219125-d3f0-4d04-a179-5f1c17d76c42 ] Json processing error.\n - Cannot construct instance of com.vmware.vcloud.api.rest.schema_v1_5.MetadataTypedValue (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 1, column: 15] (through reference chain: com.vmware.vcloud.api.rest.schema_v1_5.MetadataValueType["typedValue"])"

To Reproduce
Steps to reproduce the behavior:

call PUT /admin/catalog/{id}/metadata/{key} and set payload as per MetadataValueType (application/vnd.vmware.vcloud.metadata.value+json) fails with above message

Is this a problem with @vcd/bindings or am I missing something?
I am working with API version 31.0 (but same error if using version 30.0)

TranslateService and TranslatePipe are no longer needed

TranslateService and TranslatePipe are no longer needed, since there is @vcd/i18n package now.

If using both this sdk and the vcd/i18n package in a project, there is problem with the name of the translate pipe in the html template files, which leads to inconsistent and sometimes unexpected behavior.

AuthTokenHolderService not working

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
When injecting AuthTokenHolderService in a component, will see below error:

[aa9c002b-6b57-4025-8f9c-cdd14152bc26 (Provider Cloud Service)] Could not load module Error: Can't resolve all parameters for PcsComponent: (?, [object Object], [object Object], [object Object], [object Object], [object Object], [object Object]).
    at syntaxError (vendor.bundle.js:452)
    at CompileMetadataResolver._getDependenciesMetadata (vendor.bundle.js:677)
    at CompileMetadataResolver._getTypeMetadata (vendor.bundle.js:677)
    at CompileMetadataResolver.getNonNormalizedDirectiveMetadata (vendor.bundle.js:677)
    at CompileMetadataResolver._getEntryComponentMetadata (vendor.bundle.js:677)
    at vendor.bundle.js:677
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver._getEntryComponentsFromProvider (vendor.bundle.js:677)
    at vendor.bundle.js:677
    at Array.forEach (<anonymous>)

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

plugin-lifecycle not uploading

Shall I log a call or is this a known issue?
Tried the latest plugin-lifecycle.
Can see it in 9.7 and 9.5 provider portal and it lists the existing vrops plugin previously installed, however when I try to upload a plugin (i.e. the latest vcd-ext-samples) it goes through the motions then just sits there spinning.
Checking the vcloud-container-debug.log can see
Resource plugin.zip not fully transferred yet (0/65,786) for transfer session 27424a6b-5ece-4e36-a429-eb61f2dd8a99 |

It has created the session folder in data/transfer but nothing else. Have confirmed that normal iso to a catalog is working so don't think it's a fault with the NFS mounts or certs.

Commit `f78201cfef469b9d45353eea9b17f84d5cc2391e` breaks vCD 9.1 backwards compatibility

Describe the bug
I updated locally with the latest code in the master branch to discover that my plugins no longer would show up in the vCD tenant UI. Running yarn listUiExtensions would show the extension present but it would not show up for tenants.

To Reproduce
Steps to reproduce the behavior:

  1. Clone latest repo locally
  2. Follow instructions to Build and Install api-client
  3. Enter vcd-plugin-seed directory
  4. Configure ui_ext_api.ini
  5. Install dependencies, build, and deploy
yarn
yarn run build
yarn run deploy

Expected behavior
I expect the Seed Plugin to appear in the drop-down.

Screenshots
image

Desktop (please complete the following information):

  • OS: Mojave
  • Browser: Chrome
  • Version: Version 71.0.3578.98 (Official Build) (64-bit)

Additional context
Currently running vCD 9.1.0.2.

Backend Execution of API requests

Is your feature request related to a problem? Please describe.
Currently, when building plugins, if access to an external API is required, requests can be made via Observable/Rxjs. Since this is in the front-end, requests are made from the client, meaning additional ports are required to be opened in order to reach external APIs.

Describe the solution you'd like
Are there plans to allow backend/server-side requests to be made from the appliance via the extensibility/SDK, or is there something similar being built that allows for a remote plugin to be presented via vCD similar to vSphere?

Describe alternatives you've considered
Reverse Proxies, and API Gateways can solve this but still require external access to be provided.

vcd-ext new throws exception

Describe the bug
Versions of vcd-ext >= 0.0.13-beta.2 throw an error on vcd-ext new

To Reproduce
Steps to reproduce the behavior:

  1. npm -g i @vcd/[email protected] --save-dev
  2. vcd-ext new
$ npm -g i @vcd/[email protected] --save-dev
npm WARN deprecated @types/[email protected]: This is a stub types definition for MQTT (https://github.com/mqttjs/MQTT.js). MQTT provides its own type definitions, so you don't need @types/mqtt installed!
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
/Users/tsimchev/.nvm/versions/node/v12.19.0/bin/vcd-ext -> /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/bin/run
+ @vcd/[email protected]
updated 6 packages in 56.434s

$ rehash

$ vcd-ext new
    Error: Cannot find module 'tar-fs'
    Require stack:
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@vcd/care-package-plugin-import-vapp/lib/BuildActions.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@vcd/care-package-plugin-import-vapp/lib/index.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@vcd/care-package/lib/plugins/PluginLoader.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@vcd/care-package/lib/CarePackage.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@vcd/care-package/lib/index.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/lib/generators/new.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/yeoman-environment/lib/store.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/yeoman-environment/lib/environment.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/lib/ScaffoldingBaseCommand.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/lib/commands/new.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@oclif/config/lib/plugin.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@oclif/config/lib/config.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@oclif/config/lib/index.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@oclif/command/lib/command.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/node_modules/@oclif/command/lib/index.js
    - /Users/tsimchev/.nvm/versions/node/v12.19.0/lib/node_modules/@vcd/ext-cli/bin/run
    Code: MODULE_NOT_FOUND

Expected behavior

$ vcd-ext new
? Your solution name Enter a solution name (GettingStarted)
? Specify first version Either press enter or type in a different version
? Specify vendor name Type in vendor name, for this example we type in 'vmware'
? Specify vendor link Either press enter or type in a different vendor link, for this example we press enter
? Specify minimum required Cloud Director version Either press enter or type in a version, for this example we press enter
? Specify solution license Either press enter or type in a different license type, for this example we press enter
? Select extensibility elements (Press <space> to select, <a> to toggle all, <i> to invert selection)
◯ Import vApp
◯ Defined Entities
◯ UI Plugin

Screenshots
If applicable, add screenshots to help explain your problem.

Version:

vcd-ext --version
@vcd/ext-cli/0.0.13-beta.2 darwin-x64 node-v12.19.0

Install SDK in Angular 7+ et al

  • Wondering if there is an effort to add this SDK into Angular 7 or 8?
  • Is there documentation to the SDK that someone can share or point me to?
  • Are there other UI code samples available?

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.