├── .dockerignore ├── h5c ├── vic │ ├── src │ │ ├── vic-webapp │ │ │ ├── src │ │ │ │ ├── assets │ │ │ │ │ └── .gitkeep │ │ │ │ ├── app │ │ │ │ │ ├── app.component.scss │ │ │ │ │ ├── create-vch-wizard │ │ │ │ │ │ ├── operations-user │ │ │ │ │ │ │ ├── operations-user.scss │ │ │ │ │ │ │ └── operations-user.component.ts │ │ │ │ │ │ ├── general │ │ │ │ │ │ │ └── general.scss │ │ │ │ │ │ ├── create-vch-wizard.component.scss │ │ │ │ │ │ ├── summary │ │ │ │ │ │ │ └── summary.scss │ │ │ │ │ │ ├── storage-capacity │ │ │ │ │ │ │ └── storage-capacity.scss │ │ │ │ │ │ ├── registry-access │ │ │ │ │ │ │ └── registry-access.scss │ │ │ │ │ │ ├── security │ │ │ │ │ │ │ └── security.scss │ │ │ │ │ │ ├── networks │ │ │ │ │ │ │ └── networks.scss │ │ │ │ │ │ └── compute-capacity │ │ │ │ │ │ │ └── compute-capacity.scss │ │ │ │ │ ├── vch-view │ │ │ │ │ │ ├── vch-view.scss │ │ │ │ │ │ └── vch-log-view │ │ │ │ │ │ │ ├── vch-log-view.scss │ │ │ │ │ │ │ └── vch-log-view.template.html │ │ │ │ │ ├── shared │ │ │ │ │ │ ├── app-alert.component.html │ │ │ │ │ │ ├── utils │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── model-checker.ts │ │ │ │ │ │ │ ├── array-utils.ts │ │ │ │ │ │ │ ├── disable-cookie-xsrf-strategy.ts │ │ │ │ │ │ │ ├── array-utils.spec.ts │ │ │ │ │ │ │ ├── detection.ts │ │ │ │ │ │ │ ├── model-checker.spec.ts │ │ │ │ │ │ │ ├── filesize.spec.ts │ │ │ │ │ │ │ └── filesize.ts │ │ │ │ │ │ ├── constants │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── vicvms.ts │ │ │ │ │ │ │ ├── delete-vch-modal.ts │ │ │ │ │ │ │ ├── portlets.text.ts │ │ │ │ │ │ │ ├── vm.constants.ts │ │ │ │ │ │ │ ├── create-vch-wizard.ts │ │ │ │ │ │ │ └── nodetype.ts │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── app-config.ts │ │ │ │ │ │ ├── shared.module.ts │ │ │ │ │ │ ├── refresh.service.ts │ │ │ │ │ │ ├── vic-i18n.service.ts │ │ │ │ │ │ ├── app-alert.service.ts │ │ │ │ │ │ └── i18n.service.spec.ts │ │ │ │ │ ├── delete-vch-modal │ │ │ │ │ │ ├── delete-vch-modal.component.scss │ │ │ │ │ │ ├── delete-vch-modal.component.html │ │ │ │ │ │ └── delete-vch-modal.module.ts │ │ │ │ │ ├── environment.ts │ │ │ │ │ ├── summary-portlet │ │ │ │ │ │ ├── summary-portlet.scss │ │ │ │ │ │ ├── vch-portlet │ │ │ │ │ │ │ └── vch-portlet.scss │ │ │ │ │ │ ├── container-portlet │ │ │ │ │ │ │ └── container-portlet.scss │ │ │ │ │ │ └── summary-portlet.module.ts │ │ │ │ │ ├── testing │ │ │ │ │ │ ├── jasmine.constants.ts │ │ │ │ │ │ └── router-stubs.ts │ │ │ │ │ ├── services │ │ │ │ │ │ ├── extended-serverinfo.interface.ts │ │ │ │ │ │ ├── http-interceptor.service.ts │ │ │ │ │ │ ├── mocks │ │ │ │ │ │ │ └── vmStub.ts │ │ │ │ │ │ └── http-interceptor.service.spec.ts │ │ │ │ │ ├── interfaces │ │ │ │ │ │ └── compute.resource.ts │ │ │ │ │ ├── ui-actions │ │ │ │ │ │ └── ui-actions.module.ts │ │ │ │ │ ├── summary-view │ │ │ │ │ │ ├── vic-summary-view.scss │ │ │ │ │ │ └── summary-view.module.ts │ │ │ │ │ └── container-view │ │ │ │ │ │ └── container-view.module.ts │ │ │ │ ├── favicon.ico │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── environments │ │ │ │ │ ├── global-properties.ts │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── styles.scss │ │ │ │ ├── tsconfig.spec.json │ │ │ │ ├── typings.d.ts │ │ │ │ ├── main.ts │ │ │ │ └── test.ts │ │ │ ├── .gitignore │ │ │ ├── e2e │ │ │ │ ├── tsconfig.e2e.json │ │ │ │ └── pages │ │ │ │ │ ├── common.ts │ │ │ │ │ ├── homePage.ts │ │ │ │ │ └── loginPage.ts │ │ │ ├── .editorconfig │ │ │ ├── tsconfig.json │ │ │ ├── build.sh │ │ │ └── protractor.conf.js │ │ └── main │ │ │ └── webapp │ │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── default.css │ │ │ │ └── plugin-icons.css │ │ │ ├── images │ │ │ │ ├── addIcon.png │ │ │ │ └── editIcon.png │ │ │ └── vic-icons │ │ │ │ ├── 100x100.png │ │ │ │ ├── 128x128.png │ │ │ │ ├── 16x16.png │ │ │ │ ├── 256x256.png │ │ │ │ ├── 32x32.png │ │ │ │ └── 48x48.png │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── .settings │ │ ├── com.eclipsesource.jshint.ui.prefs │ │ ├── .jsdtscope │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ └── org.eclipse.wst.common.component │ ├── build-resources.xml │ ├── .externalToolBuilders │ │ └── org.eclipse.wst.jsdt.core.javascriptValidator.launch │ ├── build-war.sh │ ├── build-resources.sh │ ├── .project │ ├── build-plugin-package.sh │ ├── build-war.bat │ ├── build-resources.bat │ ├── build-plugin-package.bat │ ├── build-plugin-package.xml │ └── plugin-package.xml ├── vic-service │ ├── src │ │ ├── main │ │ │ ├── resources │ │ │ │ ├── configs.properties │ │ │ │ └── META-INF │ │ │ │ │ └── MANIFEST.MF │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── vmware │ │ │ │ ├── vic │ │ │ │ ├── services │ │ │ │ │ ├── CloneTicketService.java │ │ │ │ │ ├── VicApplianceService.java │ │ │ │ │ ├── VicUserSessionService.java │ │ │ │ │ ├── ResourcePoolService.java │ │ │ │ │ ├── VicUserSessionServiceImpl.java │ │ │ │ │ ├── SampleActionService.java │ │ │ │ │ ├── VicApplianceServiceImpl.java │ │ │ │ │ └── CloneTicketServiceImpl.java │ │ │ │ ├── model │ │ │ │ │ ├── RootInfo.java │ │ │ │ │ ├── constants │ │ │ │ │ │ ├── VsphereObjects.java │ │ │ │ │ │ ├── Vch.java │ │ │ │ │ │ ├── Container.java │ │ │ │ │ │ └── BaseVm.java │ │ │ │ │ ├── VmQueryResult.java │ │ │ │ │ └── ModelObject.java │ │ │ │ └── utils │ │ │ │ │ └── ConfigLoader.java │ │ │ │ └── utils │ │ │ │ └── ssl │ │ │ │ └── ThumbprintHostNameVerifier.java │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── vmware │ │ │ └── vic │ │ │ └── test │ │ │ └── ConfigLoaderTest.java │ ├── .settings │ │ ├── org.eclipse.m2e.core.prefs │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ └── org.eclipse.jdt.core.prefs │ ├── .project │ ├── build-java.sh │ └── build-java.bat ├── vic-uia │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ ├── org.eclipse.m2e.core.prefs │ │ ├── org.eclipse.wst.common.project.facet.core.xml │ │ └── org.eclipse.jdt.core.prefs │ ├── src │ │ └── main │ │ │ ├── resources │ │ │ └── locale │ │ │ │ ├── de_DE │ │ │ │ └── com_vmware_vic.properties │ │ │ │ ├── en_US │ │ │ │ └── com_vmware_vic.properties │ │ │ │ ├── fr_FR │ │ │ │ └── com_vmware_vic.properties │ │ │ │ ├── ja_JP │ │ │ │ └── com_vmware_vic.properties │ │ │ │ ├── ko_KR │ │ │ │ └── com_vmware_vic.properties │ │ │ │ ├── zh_CN │ │ │ │ └── com_vmware_vic.properties │ │ │ │ └── zh_TW │ │ │ │ └── com_vmware_vic.properties │ │ │ └── java │ │ │ └── com │ │ │ └── vmware │ │ │ └── vsphere │ │ │ └── client │ │ │ └── automation │ │ │ ├── step │ │ │ ├── common │ │ │ │ ├── VicCommon.java │ │ │ │ └── MaximizeWindowStep.java │ │ │ └── objectworkspace │ │ │ │ ├── OpenWorkspaceByGIListStep.java │ │ │ │ ├── OpenWorkspaceByHomeShortcutStep.java │ │ │ │ ├── OpenVicWorkspaceLandingPageStep.java │ │ │ │ ├── VerifySuccessfulEntryStep.java │ │ │ │ ├── VerifyVendorStep.java │ │ │ │ └── VerifyVchNumberStep.java │ │ │ ├── testbed │ │ │ └── VicTestbed.java │ │ │ └── test │ │ │ └── common │ │ │ └── DoNothingExceptLoginTest.java │ └── .project └── .gitignore ├── tests ├── resources │ ├── dockerfiles │ │ ├── configs │ │ │ ├── env-file │ │ │ │ ├── test.env │ │ │ │ └── docker-compose.yml │ │ │ ├── volumes │ │ │ │ ├── docker-compose.yml │ │ │ │ ├── volume-label.yml │ │ │ │ └── external-volumes.yml │ │ │ ├── extends │ │ │ │ ├── valid-composite-extends.yml │ │ │ │ ├── valid-common.yml │ │ │ │ ├── nonexistent-service.yml │ │ │ │ ├── valid-interpolation-2.yml │ │ │ │ ├── service-with-invalid-schema.yml │ │ │ │ ├── valid-interpolation.yml │ │ │ │ ├── common.yml │ │ │ │ ├── healthcheck-2.yml │ │ │ │ ├── nested-intermediate.yml │ │ │ │ ├── nested.yml │ │ │ │ ├── nonexistent-path-base.yml │ │ │ │ ├── service-with-valid-composite-extends.yml │ │ │ │ ├── valid-common-config.yml │ │ │ │ ├── invalid-net.yml │ │ │ │ ├── invalid-volumes.yml │ │ │ │ ├── no-file-specified.yml │ │ │ │ ├── invalid-links.yml │ │ │ │ ├── nonexistent-path-child.yml │ │ │ │ ├── circle-1.yml │ │ │ │ ├── circle-2.yml │ │ │ │ ├── healthcheck-1.yml │ │ │ │ ├── invalid-net-v2.yml │ │ │ │ ├── verbose-and-shorthand.yml │ │ │ │ ├── common-env-labels-ulimits.yml │ │ │ │ ├── docker-compose.yml │ │ │ │ └── specify-file-as-self.yml │ │ │ ├── command │ │ │ │ └── docker-compose.yml │ │ │ ├── depends_on │ │ │ │ ├── Dockerfile │ │ │ │ └── docker-compose.yml │ │ │ ├── container_name │ │ │ │ └── docker-compose.yml │ │ │ ├── group_add │ │ │ │ └── docker-compose.yml │ │ │ ├── environment-composefile │ │ │ │ └── docker-compose.yml │ │ │ ├── networks │ │ │ │ ├── bridge.yml │ │ │ │ ├── missing-network.yml │ │ │ │ ├── network-internal.yml │ │ │ │ ├── network-label.yml │ │ │ │ ├── external-default.yml │ │ │ │ ├── network-aliases.yml │ │ │ │ ├── external-networks.yml │ │ │ │ ├── default-network-config.yml │ │ │ │ ├── docker-compose.yml │ │ │ │ ├── network-static-addresses.yml │ │ │ │ └── network-mode.yml │ │ │ ├── ports-composefile │ │ │ │ ├── docker-compose.yml │ │ │ │ └── expanded-notation.yml │ │ │ ├── labels │ │ │ │ └── docker-compose.yml │ │ │ ├── links-composefile │ │ │ │ └── docker-compose.yml │ │ │ └── stop-signal-composefile │ │ │ │ └── docker-compose.yml │ │ ├── Dockerfile.1-37-Docker-USER-UID-2000 │ │ ├── Dockerfile.1-37-Docker-USER-UID_GID_2000_2000 │ │ ├── Dockerfile.1-37-Docker-USER-NewUser_NewGroup │ │ └── Dockerfile.1-19-Docker-Verify-Volume-Files │ ├── dynamic-vars.py │ ├── Slack-Util.robot │ ├── Drone-Util.robot │ ├── Util.robot │ ├── Github-Util.robot │ └── VCH-Creation-Wizard-UI-Util.robot ├── robot-indices │ ├── DateTime.index │ ├── Process.index │ ├── SSHLibrary.index │ ├── String.index │ ├── Collections.index │ └── OperatingSystem.index ├── test-cases │ ├── README.md │ ├── Group18-VIC-UI │ │ ├── TestCases.md │ │ ├── 18-2-VIC-UI-Uninstaller.md │ │ ├── 18-1-VIC-UI-Installer.md │ │ └── 18-3-VIC-UI-Upgrader.md │ ├── Group2-VIC-Upgrade │ │ ├── 2-01-VIC-Upgrade.md │ │ └── 2-01-VIC-Upgrade.robot │ ├── Group1-VCH-Creation-Wizard │ │ ├── 1-02-Multi-DVS-VCH-Create.md │ │ ├── 1-01-Basic-VCH-Create.md │ │ └── 1-02-Basic-VCH-Create-Host-Affinity.md │ └── Group13-vMotion │ │ ├── 13-02-vMotion-Container.md │ │ └── 13-01-vMotion-VCH-Appliance.md ├── check-org-membership.sh ├── pass-rate.sh ├── save-test-results.sh └── nightly │ └── upload-logs.sh ├── NOTICE.txt ├── .github └── PULL_REQUEST_TEMPLATE.md ├── README.md ├── OWNERS.md ├── .drone.local.plugin.yml ├── .gitignore └── .drone.local.script.yml /.dockerignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | bin/** 3 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/env-file/test.env: -------------------------------------------------------------------------------- 1 | FOO=1 -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/operations-user/operations-user.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/resources/configs.properties: -------------------------------------------------------------------------------- 1 | uiVersion=UI_VERSION_PLACEHOLDER 2 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/volumes/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: {} 3 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/valid-composite-extends.yml: -------------------------------------------------------------------------------- 1 | web: 2 | command: top 3 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/Dockerfile.1-37-Docker-USER-UID-2000: -------------------------------------------------------------------------------- 1 | FROM busybox:latest 2 | USER 2000 3 | CMD id 4 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/valid-common.yml: -------------------------------------------------------------------------------- 1 | common-config: 2 | environment: 3 | - FOO=1 4 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/command/docker-compose.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | image: busybox:latest 3 | command: ls 4 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/vic-webapp/src/favicon.ico -------------------------------------------------------------------------------- /tests/resources/dockerfiles/Dockerfile.1-37-Docker-USER-UID_GID_2000_2000: -------------------------------------------------------------------------------- 1 | from busybox:latest 2 | user 2000:2000 3 | cmd id 4 | -------------------------------------------------------------------------------- /h5c/vic/.settings/com.eclipsesource.jshint.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | excluded=//*.min.js 3 | included=//*.js 4 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/nonexistent-service.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: busybox 3 | extends: 4 | service: foo 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/valid-interpolation-2.yml: -------------------------------------------------------------------------------- 1 | web: 2 | build: '.' 3 | hostname: "host-${HOSTNAME_VALUE}" 4 | -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/css/default.css: -------------------------------------------------------------------------------- 1 | @CHARSET "US-ASCII"; 2 | body { 3 | font-size: 12px; 4 | font-family: Arial; 5 | } 6 | -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/images/addIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/images/addIcon.png -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/env-file/docker-compose.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: busybox 3 | command: /bin/true 4 | env_file: ./test.env 5 | -------------------------------------------------------------------------------- /h5c/vic-uia/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding/=UTF-8 4 | -------------------------------------------------------------------------------- /h5c/vic-uia/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/images/editIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/images/editIcon.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/100x100.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/128x128.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/16x16.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/256x256.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/32x32.png -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/vic-icons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware/vic-ui/HEAD/h5c/vic/src/main/webapp/assets/vic-icons/48x48.png -------------------------------------------------------------------------------- /h5c/vic-service/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/depends_on/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox:latest 2 | LABEL com.docker.compose.test_image=true 3 | VOLUME /data 4 | CMD top 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/container_name/docker-compose.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | image: busybox:latest 3 | container_name: my-web-container 4 | command: ls 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/service-with-invalid-schema.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | file: valid-composite-extends.yml 4 | service: web 5 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/general/general.scss: -------------------------------------------------------------------------------- 1 | :host ::ng-deep clr-signpost .signpost-action { 2 | margin-top: 0; 3 | margin-bottom: 0; 4 | } 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/valid-interpolation.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | service: web 4 | file: valid-interpolation-2.yml 5 | command: top 6 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/group_add/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | myservice: 4 | image: redis 5 | group_add: 6 | - mail 7 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .angular/ 3 | typings/ 4 | build-dev/ 5 | node_modules/ 6 | tsc-results/ 7 | coverage/ 8 | yarn-error.log 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/create-vch-wizard.component.scss: -------------------------------------------------------------------------------- 1 | .clr-wizard--inline { 2 | height: 100vh; 3 | } 4 | .spinner { 5 | z-index: 10000; 6 | } 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/common.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: busybox 3 | command: /bin/true 4 | net: host 5 | environment: 6 | - FOO=1 7 | - BAR=1 8 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/healthcheck-2.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | demo: 4 | extends: 5 | file: healthcheck-1.yml 6 | service: demo 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/Dockerfile.1-37-Docker-USER-NewUser_NewGroup: -------------------------------------------------------------------------------- 1 | FROM busybox:latest 2 | RUN addgroup newuser && adduser -H -S newuser -G newuser 3 | USER newuser 4 | CMD id 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/nested-intermediate.yml: -------------------------------------------------------------------------------- 1 | webintermediate: 2 | extends: 3 | file: common.yml 4 | service: web 5 | environment: 6 | - "FOO=2" 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/nested.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | file: nested-intermediate.yml 4 | service: webintermediate 5 | environment: 6 | - "BAR=2" 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/nonexistent-path-base.yml: -------------------------------------------------------------------------------- 1 | dnebase: 2 | build: nonexistent.path 3 | command: /bin/true 4 | environment: 5 | - FOO=1 6 | - BAR=1 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/service-with-valid-composite-extends.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | build: '.' 3 | extends: 4 | file: 'valid-composite-extends.yml' 5 | service: web 6 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/valid-common-config.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | build: '.' 3 | extends: 4 | file: valid-common.yml 5 | service: common-config 6 | command: top 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/invalid-net.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | build: '.' 3 | extends: 4 | service: web 5 | command: top 6 | web: 7 | build: '.' 8 | net: "container:db" 9 | -------------------------------------------------------------------------------- /h5c/vic-uia/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/environment-composefile/docker-compose.yml: -------------------------------------------------------------------------------- 1 | service: 2 | image: busybox:latest 3 | command: top 4 | 5 | environment: 6 | foo: bar 7 | hello: world 8 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/bridge.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | networks: 3 | default: 4 | driver: bridge 5 | services: 6 | web: 7 | image: busybox 8 | command: top 9 | -------------------------------------------------------------------------------- /tests/robot-indices/DateTime.index: -------------------------------------------------------------------------------- 1 | Add Time To Date 2 | Add Time To Time 3 | Convert Date 4 | Convert Time 5 | Get Current Date 6 | Subtract Date From Date 7 | Subtract Time From Date 8 | Subtract Time From Time -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/invalid-volumes.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | build: '.' 3 | extends: 4 | service: web 5 | command: top 6 | web: 7 | build: '.' 8 | volumes_from: 9 | - "db" 10 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/ports-composefile/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | simple: 3 | image: busybox:latest 4 | command: top 5 | ports: 6 | - '3000' 7 | - '49152:3001' 8 | - '49153-49154:3002-3003' 9 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/vch-view/vch-view.scss: -------------------------------------------------------------------------------- 1 | :host ::ng-deep .datagrid-head .datagrid-row-actions { 2 | visibility: hidden; 3 | } 4 | 5 | a.pointer-with-no-href { 6 | cursor: pointer; 7 | color:#007cbb; 8 | } 9 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/no-file-specified.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | service: web 4 | environment: 5 | - "BAR=1" 6 | web: 7 | image: busybox 8 | environment: 9 | - "BAZ=3" 10 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/missing-network.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: ["foo"] 8 | 9 | networks: 10 | bar: {} 11 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/labels/docker-compose.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | image: busybox:latest 3 | labels: 4 | com.example.department: "Finance" 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: ls 9 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/invalid-links.yml: -------------------------------------------------------------------------------- 1 | mydb: 2 | build: '.' 3 | myweb: 4 | build: '.' 5 | extends: 6 | service: web 7 | command: top 8 | web: 9 | build: '.' 10 | links: 11 | - "mydb:db" 12 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/nonexistent-path-child.yml: -------------------------------------------------------------------------------- 1 | dnechild: 2 | extends: 3 | file: nonexistent-path-base.yml 4 | service: dnebase 5 | image: busybox 6 | command: /bin/true 7 | environment: 8 | - BAR=2 9 | -------------------------------------------------------------------------------- /h5c/.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | vic/src/main/webapp/locales/ 3 | vic/src/main/webapp/resources/dist/ 4 | vic/src/main/webapp/resources/build-dev/ 5 | vic/src/vic-app/coverage/ 6 | 7 | # build shortcuts 8 | dev-build.sh 9 | prod-build.sh 10 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/app-alert.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{message}} 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/depends_on/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | services: 3 | web: 4 | image: busybox 5 | depends_on: 6 | - db 7 | - redis 8 | redis: 9 | image: redis 10 | db: 11 | image: postgres 12 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/circle-1.yml: -------------------------------------------------------------------------------- 1 | foo: 2 | image: busybox 3 | bar: 4 | image: busybox 5 | web: 6 | extends: 7 | file: circle-2.yml 8 | service: other 9 | baz: 10 | image: busybox 11 | quux: 12 | image: busybox 13 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/circle-2.yml: -------------------------------------------------------------------------------- 1 | foo: 2 | image: busybox 3 | bar: 4 | image: busybox 5 | other: 6 | extends: 7 | file: circle-1.yml 8 | service: web 9 | baz: 10 | image: busybox 11 | quux: 12 | image: busybox 13 | -------------------------------------------------------------------------------- /h5c/vic-service/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/healthcheck-1.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | services: 3 | demo: 4 | image: foobar:latest 5 | healthcheck: 6 | test: ["CMD", "/health.sh"] 7 | interval: 10s 8 | timeout: 5s 9 | retries: 36 10 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/links-composefile/docker-compose.yml: -------------------------------------------------------------------------------- 1 | db: 2 | image: busybox:latest 3 | command: top 4 | web: 5 | image: busybox:latest 6 | command: top 7 | links: 8 | - db:db 9 | console: 10 | image: busybox:latest 11 | command: top 12 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/network-internal.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | - internal 9 | 10 | networks: 11 | internal: 12 | driver: bridge 13 | internal: True 14 | -------------------------------------------------------------------------------- /tests/test-cases/README.md: -------------------------------------------------------------------------------- 1 | VIC-UI Integration Test Suite 2 | ======= 3 | - 4 | [Group 1 - VCH Lifecycle Wizard (Create, Edit, and Delete)](Group1-VCH-Creation-Wizard/TestCases.md) 5 | - 6 | [Group 18 - VIC Plugin (Install, Uninstall, Upgrade, Portlet)](Group1-VIC-UI/TestCases.md) 7 | - 8 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/invalid-net-v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | myweb: 4 | build: '.' 5 | extends: 6 | service: web 7 | command: top 8 | web: 9 | build: '.' 10 | network_mode: "service:net" 11 | net: 12 | build: '.' 13 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "node" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /h5c/vic/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/network-label.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | - network_with_label 9 | 10 | networks: 11 | network_with_label: 12 | labels: 13 | - "label_key=label_val" 14 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/stop-signal-composefile/docker-compose.yml: -------------------------------------------------------------------------------- 1 | simple: 2 | image: busybox:latest 3 | command: 4 | - sh 5 | - '-c' 6 | - | 7 | trap 'exit 0' SIGINT 8 | trap 'exit 1' SIGTERM 9 | while true; do :; done 10 | stop_signal: SIGINT 11 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/volumes/volume-label.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | volumes: 8 | - volume_with_label:/data 9 | 10 | volumes: 11 | volume_with_label: 12 | labels: 13 | - "label_key=label_val" 14 | -------------------------------------------------------------------------------- /h5c/vic/build-resources.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/verbose-and-shorthand.yml: -------------------------------------------------------------------------------- 1 | base: 2 | image: busybox 3 | environment: 4 | - "BAR=1" 5 | 6 | verbose: 7 | extends: 8 | service: base 9 | environment: 10 | - "FOO=1" 11 | 12 | shorthand: 13 | extends: base 14 | environment: 15 | - "FOO=2" 16 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/summary/summary.scss: -------------------------------------------------------------------------------- 1 | div.form-group { 2 | & span.red-text { 3 | color: red; 4 | } 5 | } 6 | 7 | textarea#cliCommand { 8 | min-height: 150px; 9 | font-size: 0.9em; 10 | } 11 | 12 | #vch-payload-stackview ::ng-deep > .stack-view { 13 | height: auto; 14 | } 15 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/external-default.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: top 9 | networks: 10 | default: 11 | external: 12 | name: composetest_external_network 13 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/common-env-labels-ulimits.yml: -------------------------------------------------------------------------------- 1 | web: 2 | extends: 3 | file: common.yml 4 | service: web 5 | environment: 6 | - FOO=2 7 | - BAZ=3 8 | labels: ['label=one'] 9 | ulimits: 10 | nproc: 65535 11 | memlock: 12 | soft: 1024 13 | hard: 2048 14 | -------------------------------------------------------------------------------- /h5c/vic/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "esnext", 6 | "baseUrl": "", 7 | "strict": false, 8 | "types": [] 9 | }, 10 | "exclude": [ 11 | "test.ts", 12 | "**/*.spec.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/network-aliases.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | front: 9 | aliases: 10 | - forward_facing 11 | - ahead 12 | back: 13 | 14 | networks: 15 | front: {} 16 | back: {} 17 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/volumes/external-volumes.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | volumes: 8 | - foo:/var/lib/ 9 | - bar:/etc/ 10 | 11 | volumes: 12 | foo: 13 | external: true 14 | bar: 15 | external: 16 | name: some_bar 17 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/external-networks.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: 8 | - networks_foo 9 | - bar 10 | 11 | networks: 12 | networks_foo: 13 | external: true 14 | bar: 15 | external: 16 | name: networks_bar 17 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/delete-vch-modal/delete-vch-modal.component.scss: -------------------------------------------------------------------------------- 1 | .clr-wizard { 2 | .spinner { 3 | left: calc(50% - 40px); 4 | top: 25%; 5 | } 6 | } 7 | 8 | .separator { 9 | content: ""; 10 | border-left: 1px solid #ccc; 11 | margin: 0 18px; 12 | height: 1em; 13 | } 14 | 15 | .subtitle { 16 | font-size: 0.7em; 17 | } 18 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/default-network-config.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | another: 7 | image: busybox:latest 8 | command: top 9 | networks: 10 | default: 11 | driver: bridge 12 | driver_opts: 13 | "com.docker.network.bridge.enable_icc": "false" 14 | -------------------------------------------------------------------------------- /tests/test-cases/Group18-VIC-UI/TestCases.md: -------------------------------------------------------------------------------- 1 | Group 18 - VIC UI 2 | ======= 3 | 4 | [Test 18-1 - VIC UI Installation](18-1-VIC-UI-Installer.md) 5 | - 6 | [Test 18-2 - VIC UI Uninstallation](18-2-VIC-UI-Uninstaller.md) 7 | - 8 | [Test 18-3 - VIC UI Upgrade](18-3-VIC-UI-Upgrader.md) 9 | - 10 | [Test 18-4 - VIC UI Plugin tests](18-4-VIC-UI-Plugin-tests.md) 11 | - 12 | -------------------------------------------------------------------------------- /tests/robot-indices/Process.index: -------------------------------------------------------------------------------- 1 | Get Process Id 2 | Get Process Object 3 | Get Process Result 4 | Is Process Running 5 | Join Command Line 6 | Process Should Be Running 7 | Process Should Be Stopped 8 | Run Process 9 | Send Signal To Process 10 | Split Command Line 11 | Start Process 12 | Switch Process 13 | Terminate All Processes 14 | Terminate Process 15 | Wait For Process -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/docker-compose.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | file: common.yml 4 | service: web 5 | command: top 6 | links: 7 | - "mydb:db" 8 | environment: 9 | # leave FOO alone 10 | # override BAR 11 | BAR: "2" 12 | # add BAZ 13 | BAZ: "2" 14 | net: bridge 15 | mydb: 16 | image: busybox 17 | command: top 18 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/storage-capacity/storage-capacity.scss: -------------------------------------------------------------------------------- 1 | .vol-datastore { 2 | &-header { 3 | position: absolute; 4 | top: -20px; 5 | font-weight: bold; 6 | } 7 | 8 | &-actions clr-icon { 9 | margin-top: 9px; 10 | cursor: pointer; 11 | } 12 | } 13 | 14 | .image-size-label { 15 | margin-top: 10px; 16 | line-height: 16px; 17 | } 18 | -------------------------------------------------------------------------------- /h5c/vic/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/extends/specify-file-as-self.yml: -------------------------------------------------------------------------------- 1 | myweb: 2 | extends: 3 | file: specify-file-as-self.yml 4 | service: web 5 | environment: 6 | - "BAR=1" 7 | web: 8 | extends: 9 | file: specify-file-as-self.yml 10 | service: otherweb 11 | image: busybox 12 | environment: 13 | - "BAZ=3" 14 | otherweb: 15 | image: busybox 16 | environment: 17 | - "YEP=1" 18 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/environments/global-properties.ts: -------------------------------------------------------------------------------- 1 | export const globalProperties = { 2 | // vic service 3 | vicService: { 4 | paths: { 5 | base: '/ui/vic/rest/data/', 6 | get properties () {return `${this.base}properties/`}, 7 | get list () {return `${this.base}list/`}, 8 | get propertiesByRelation () {return `${this.base}propertiesByRelation/`}, 9 | } 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | VicWebapp 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | 4 | /* Fixes broken position of the spinner set by .clr-wizard */ 5 | 6 | #compute-resource-selector .spinner { 7 | top: 2% !important; 8 | left: 2% !important; 9 | } 10 | 11 | .modal .mb10 { 12 | margin-bottom: 10px; 13 | } 14 | 15 | .cursor-pointer { 16 | cursor: pointer; 17 | } 18 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/registry-access/registry-access.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/@clr/ui/src/color/variables.color"; 2 | 3 | .add-remove-actions { 4 | 5 | clr-icon { 6 | margin-top: 9px; 7 | cursor: pointer; 8 | } 9 | 10 | .btn { 11 | color: $clr-action-blue-dark-midtone; 12 | 13 | &:hover { 14 | color: $clr-action-blue-dark; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | web: 5 | image: busybox 6 | command: top 7 | networks: ["front"] 8 | app: 9 | image: busybox 10 | command: top 11 | networks: ["front", "back"] 12 | links: 13 | - "db:database" 14 | db: 15 | image: busybox 16 | command: top 17 | networks: ["back"] 18 | 19 | networks: 20 | front: {} 21 | back: {} 22 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/ports-composefile/expanded-notation.yml: -------------------------------------------------------------------------------- 1 | version: '3.2' 2 | services: 3 | simple: 4 | image: busybox:latest 5 | command: top 6 | ports: 7 | - target: 3000 8 | - target: 3001 9 | published: 49152 10 | - target: 3002 11 | published: 49153 12 | protocol: tcp 13 | - target: 3003 14 | published: 49154 15 | protocol: udp 16 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/de_DE/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/en_US/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/fr_FR/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/ja_JP/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/ko_KR/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/zh_CN/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/resources/locale/zh_TW/com_vmware_vic.properties: -------------------------------------------------------------------------------- 1 | container.label=Container 2 | container.name.label=Name 3 | container.image.label=Image 4 | container.portmapping.label=Port Mapping 5 | vch.label=Virtual Container Host 6 | vch.dockerApiEndpoint.label=Docker API endpoint 7 | vch.vchAdminPortal.label=VCH Admin portal 8 | 9 | addIcon = Embed("../../webapp/assets/images/addIcon.png") 10 | editIcon = Embed("../../webapp/assets/images/editIcon.png") 11 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/network-static-addresses.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | 3 | services: 4 | app: 5 | image: busybox 6 | command: /bin/top 7 | networks: 8 | app_net: 9 | ipv4_address: 172.20.238.10 10 | 11 | networks: 12 | app_net: 13 | driver: bridge 14 | enable_ipv6: true 15 | ipam: 16 | driver: default 17 | config: 18 | - subnet: 172.20.238.0/24 19 | gateway: 172.20.238.1 20 | -------------------------------------------------------------------------------- /h5c/vic-uia/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.compliance=1.7 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.7 9 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "strict": false, 8 | "baseUrl": "", 9 | "types": [ 10 | "jasmine", 11 | "node" 12 | ] 13 | }, 14 | "files": [ 15 | "test.ts", 16 | "polyfills.ts" 17 | ], 18 | "include": [ 19 | "**/*.spec.ts", 20 | "**/*.d.ts" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/vch-view/vch-log-view/vch-log-view.scss: -------------------------------------------------------------------------------- 1 | .log-header { 2 | display: flex; 3 | align-items: center; 4 | margin-bottom: 5px; 5 | 6 | .log-title { 7 | flex-grow: 1; 8 | } 9 | 10 | form { 11 | display: flex; 12 | align-items: center; 13 | 14 | .toggle-switch { 15 | margin: 0; 16 | } 17 | } 18 | } 19 | 20 | .log-content { 21 | pre { 22 | line-height: 1em; 23 | border-radius: 0; 24 | white-space: pre-line; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | NOTICE 2 | 3 | Integrated containers UI for vSphere 4 | 5 | Copyright (c) 2017-2019 VMware, Inc. All Rights Reserved. 6 | 7 | This product is licensed to you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License. 8 | 9 | This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. 10 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/security/security.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/@clr/ui/src/color/variables.color"; 2 | 3 | :host ::ng-deep clr-signpost .signpost-action { 4 | margin-top: 0; 5 | margin-bottom: 0; 6 | } 7 | 8 | .add-remove-actions { 9 | 10 | clr-icon { 11 | margin-top: 9px; 12 | cursor: pointer; 13 | } 14 | 15 | .btn { 16 | color: $clr-action-blue-dark-midtone; 17 | 18 | &:hover { 19 | color: $clr-action-blue-dark; 20 | } 21 | } 22 | } 23 | 24 | .toggle-switch--no-label { 25 | margin-right: 0; 26 | } 27 | -------------------------------------------------------------------------------- /tests/test-cases/Group2-VIC-Upgrade/2-01-VIC-Upgrade.md: -------------------------------------------------------------------------------- 1 | Test 2-01 - VIC Upgrade 2 | ======= 3 | 4 | # Purpose: 5 | To verify that a VIC OVA and Plugin upgrade from admin portal succeeds 6 | 7 | # References: 8 | 9 | # Environment: 10 | This test requires that a vSphere server is running and available and VIC applicance admin page 11 | is accessible 12 | 13 | # Test Steps: 14 | 1. Navigate to VIC admin page 15 | 2. Click 'Configuration' 16 | 3. Fill in required fields for upgrade, and finish 17 | 4. Verify upgrade 18 | 19 | 20 | # Expected Outcome: 21 | * All steps should be successful 22 | 23 | # Possible Problems: 24 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/common/VicCommon.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.common; 2 | 3 | import com.vmware.vsphere.client.automation.spec.PortletSpec; 4 | 5 | public class VicCommon { 6 | public static final String VCH_PORTLET_TITLE = "Virtual Container Host"; 7 | public static final String CONTAINER_PORTLET_TITLE = "Container"; 8 | 9 | public static PortletSpec buildPortletSpec(String name) { 10 | PortletSpec pSpec = new PortletSpec(); 11 | pSpec.setTitle(name); 12 | pSpec.setIsExpectedToExist(true); 13 | 14 | return pSpec; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /h5c/vic/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "types": [ 6 | "node", 7 | "jasmine" 8 | ], 9 | "baseUrl": "src", 10 | "sourceMap": true, 11 | "declaration": false, 12 | "moduleResolution": "node", 13 | "emitDecoratorMetadata": true, 14 | "experimentalDecorators": true, 15 | "strict": false, 16 | "target": "es5", 17 | "typeRoots": [ 18 | "node_modules/@types" 19 | ], 20 | "lib": [ 21 | "es2016", 22 | "dom" 23 | ], 24 | "module": "esnext" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/resources/dynamic-vars.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | IS_LOCAL = False if (os.environ.has_key("DRONE_BUILD_NUMBER") and (int(os.environ['DRONE_BUILD_NUMBER']) != 0)) else True 4 | 5 | BUSYBOX = 'busybox' if IS_LOCAL else 'harbor.ci.drone.local/library/busybox' 6 | ALPINE = 'alpine' if IS_LOCAL else 'harbor.ci.drone.local/library/alpine' 7 | NGINX = 'nginx' if IS_LOCAL else 'harbor.ci.drone.local/library/nginx' 8 | DEBIAN = 'debian' if IS_LOCAL else 'harbor.ci.drone.local/library/debian' 9 | UBUNTU = 'ubuntu' if IS_LOCAL else 'harbor.ci.drone.local/library/ubuntu' 10 | REDIS = 'redis' if IS_LOCAL else 'harbor.ci.drone.local/library/redis' 11 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/networks/networks.scss: -------------------------------------------------------------------------------- 1 | .container-network-actions clr-icon { 2 | margin-top: 9px; 3 | cursor: pointer; 4 | } 5 | 6 | #http-proxy-port-selector, 7 | #https-proxy-port-selector { 8 | width: 6em; 9 | } 10 | 11 | :host ::ng-deep clr-signpost { 12 | .signpost-action { 13 | margin-top: 0; 14 | margin-bottom: 0; 15 | } 16 | } 17 | 18 | .bridge-network-signpost { 19 | width: 480px; 20 | } 21 | 22 | .routing-conf { 23 | display: flex; 24 | } 25 | 26 | .absolute-info { 27 | position: absolute; 28 | right: 12px; 29 | } 30 | 31 | .relative-po { 32 | position: relative !important; 33 | } 34 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/configs/networks/network-mode.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | 3 | services: 4 | my_container: 5 | image: busybox 6 | command: top 7 | 8 | bridge: 9 | image: busybox 10 | command: top 11 | network_mode: bridge 12 | 13 | service: 14 | image: busybox 15 | command: top 16 | network_mode: "service:bridge" 17 | 18 | container: 19 | image: busybox 20 | command: top 21 | network_mode: "container:my_container" 22 | 23 | host: 24 | image: busybox 25 | command: top 26 | network_mode: host 27 | 28 | none: 29 | image: busybox 30 | command: top 31 | network_mode: none 32 | -------------------------------------------------------------------------------- /tests/robot-indices/SSHLibrary.index: -------------------------------------------------------------------------------- 1 | Close All Connections 2 | Close Connection 3 | Directory Should Exist 4 | Directory Should Not Exist 5 | Enable Ssh Logging 6 | Execute Command 7 | File Should Exist 8 | File Should Not Exist 9 | Get Connection 10 | Get Connections 11 | Get Directory 12 | Get File 13 | List Directories In Directory 14 | List Directory 15 | List Files In Directory 16 | Login 17 | Login With Public Key 18 | Open Connection 19 | Put Directory 20 | Put File 21 | Read 22 | Read Command Output 23 | Read Until 24 | Read Until Prompt 25 | Read Until Regexp 26 | Set Client Configuration 27 | Set Default Configuration 28 | Start Command 29 | Switch Connection 30 | Write 31 | Write Bare 32 | Write Until Expected Output -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export * from './validators'; 18 | -------------------------------------------------------------------------------- /h5c/vic-service/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.7 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 12 | org.eclipse.jdt.core.compiler.source=1.7 13 | -------------------------------------------------------------------------------- /tests/test-cases/Group1-VCH-Creation-Wizard/1-02-Multi-DVS-VCH-Create.md: -------------------------------------------------------------------------------- 1 | Test 1-02 - Multi DVS VCH Create 2 | ======= 3 | 4 | # Purpose: 5 | To verify that an install using the VCH creation wizard to a Multi Distributed Switches 6 | Environment succeeds 7 | 8 | # References: 9 | 10 | # Environment: 11 | This test requires that a vSphere server is running and available and VIC OVA with 12 | creation wizard is installed 13 | 14 | # Test Steps: 15 | 1. Navigate to the VCH Creation Wizard 16 | 2. Click through each step of the VCH Creation Wizard using defaults in all cases except 17 | datastore and networks that you must select 18 | 19 | # Expected Outcome: 20 | * All steps should be successful 21 | 22 | # Possible Problems: 23 | API returns error 24 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | Fixes # 15 | 16 | PR acceptance checklist: 17 | 18 | [ ] All unit tests pass 19 | [ ] All e2e tests pass 20 | [ ] Unit test(s) included* 21 | [ ] e2e test(s) included* 22 | [ ] Screenshot attached and UX approved* 23 | 24 | *if applicable, add n/a if not 25 | -------------------------------------------------------------------------------- /tests/robot-indices/String.index: -------------------------------------------------------------------------------- 1 | Convert To Lowercase 2 | Convert To Uppercase 3 | Decode Bytes To String 4 | Encode String To Bytes 5 | Fetch From Left 6 | Fetch From Right 7 | Generate Random String 8 | Get Line 9 | Get Line Count 10 | Get Lines Containing String 11 | Get Lines Matching Pattern 12 | Get Lines Matching Regexp 13 | Get Regexp Matches 14 | Get Substring 15 | Remove String 16 | Remove String Using Regexp 17 | Replace String 18 | Replace String Using Regexp 19 | Should Be Byte String 20 | Should Be Lowercase 21 | Should Be String 22 | Should Be Titlecase 23 | Should Be Unicode String 24 | Should Be Uppercase 25 | Should Not Be String 26 | Split String 27 | Split String From Right 28 | Split String To Characters 29 | Split To Lines 30 | Strip String -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/environment.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const environment = { 18 | production: false 19 | }; 20 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-portlet/summary-portlet.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | h5 { 18 | background-color: #243889; 19 | } 20 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const environment = { 18 | production: true 19 | }; 20 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/testing/jasmine.constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const JASMINE_TIMEOUT = 30000; 18 | export const PROTRACTOR_JASMINE_TIMEOUT = 120000; 19 | -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: vic-ui 4 | Bundle-SymbolicName: com.vmware.vic.ui 5 | Bundle-Version: 1.0.0 6 | Bundle-Vendor: VMware 7 | Web-ContextPath: vsphere-client/vic 8 | Import-Package: com.vmware.vic.mvc;version="1.0.0", 9 | com.vmware.vic.filters;version="1.0.0", 10 | com.vmware.vic.services;version="1.0.0", 11 | com.vmware.vise.data.query;version=0, 12 | com.vmware.vise.security;version=0, 13 | com.vmware.vise.usersession;version="0", 14 | org.eclipse.virgo.web.dm;version="[3.6.0,4)", 15 | org.springframework.web.context, 16 | org.springframework.web.servlet, 17 | org.springframework.web.servlet.config, 18 | org.springframework.web.servlet.view, 19 | org.springframework.web.servlet.view.json 20 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/testbed/VicTestbed.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.testbed; 2 | 3 | import com.vmware.automation.core.annotation.TestbedInfo; 4 | import com.vmware.automation.core.testbed.Testbed; 5 | import com.vmware.vsphere.client.automation.core.spec.SingleValueSpec; 6 | import com.vmware.vsphere.client.automation.core.spec.VmSpec; 7 | 8 | /** 9 | * Defines VIC testbed to be used in vSphere tests 10 | */ 11 | 12 | @TestbedInfo(version = 1) 13 | public class VicTestbed extends Testbed { 14 | 15 | private static final long serialVersionUID = 1L; 16 | 17 | /* 18 | * Spec defining VCH VM 19 | */ 20 | public VmSpec vchVmSpec; 21 | 22 | /* 23 | * Spec defining test Container VM 24 | */ 25 | public VmSpec containerVmSpec; 26 | } 27 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /* SystemJS module definition */ 18 | declare var module: NodeModule; 19 | interface NodeModule { 20 | id: string; 21 | } 22 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/model-checker.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | export function isUploadableFileObject(object: any) { 17 | return object['name'] && object['content']; 18 | } 19 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-portlet/vch-portlet/vch-portlet.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | table { 18 | margin-top: 0px; 19 | & td:last-child { 20 | min-width: 230px; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-portlet/container-portlet/container-portlet.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | table { 18 | margin-top: 0px; 19 | & td:last-child { 20 | min-width: 230px; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # vic-ui 4 | 5 | ## Overview 6 | 7 | vSphere UI plugin for Integrated Containers on vSphere 8 | 9 | ## Related Documentation 10 | 11 | http://vmware.github.io/vic/ 12 | 13 | https://code.vmware.com/web/sdk/65/web-client 14 | 15 | ## Releases & Major Branches 16 | 17 | https://github.com/vmware/vic-ui/releases 18 | 19 | ## Contributing 20 | 21 | The vic-ui project team welcomes contributions from the community. If you wish to contribute code and you have not 22 | signed our contributor license agreement (CLA), our bot will update the issue when you open a Pull Request. For any 23 | questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq). For more detailed information, 24 | refer to [CONTRIBUTING.md](CONTRIBUTING.md). 25 | 26 | ## License 27 | 28 | Refer to [LICENSE.txt](LICENSE.txt). 29 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/CloneTicketService.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package com.vmware.vic.services; 14 | 15 | public interface CloneTicketService { 16 | public String acquireCloneTicket(String serviceGuid) throws Exception; 17 | } 18 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/VicApplianceService.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.services; 19 | 20 | public interface VicApplianceService { 21 | public String[] getVicAppliancesList(); 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/VicUserSessionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.services; 19 | 20 | public interface VicUserSessionService { 21 | boolean isCurrentUserVsphereAdmin(); 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic-uia/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | vic-uia 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | org.eclipse.m2e.core.maven2Nature 27 | org.eclipse.wst.common.project.facet.core.nature 28 | 29 | 30 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/ResourcePoolService.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.services; 19 | 20 | public interface ResourcePoolService { 21 | public boolean isNameUnique(String name) throws Exception; 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/OpenWorkspaceByGIListStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | 5 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 6 | 7 | public class OpenWorkspaceByGIListStep extends UiTestStep { 8 | private static final long serialVersionUID = 1L; 9 | private static final String XPATH_GI_VIC_SELECTOR = 10 | "//span[contains(@title, \"vSphere Integrated Containers\")]"; 11 | 12 | @Override 13 | public String getDescription() { 14 | return String.format("%s", "Clicks the 'vSphere Integrated Containers' in the Global Invetory List"); 15 | } 16 | 17 | @Override 18 | public void execute() throws Throwable { 19 | element(By.xpath(XPATH_GI_VIC_SELECTOR)).waitToBeClickable().click(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/OpenWorkspaceByHomeShortcutStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | 5 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 6 | 7 | public class OpenWorkspaceByHomeShortcutStep extends UiTestStep { 8 | private static final long serialVersionUID = 1L; 9 | private static final String XPATH_VIC_ICON_CSS_SELECTOR = 10 | "//div[contains(text(), \"vSphere Integrated Containers\")]"; 11 | 12 | @Override 13 | public String getDescription() { 14 | return String.format("%s", "Clicks the 'vSphere Integrated Containers' home shortcut"); 15 | } 16 | 17 | @Override 18 | public void execute() throws Throwable { 19 | element(By.xpath(XPATH_VIC_ICON_CSS_SELECTOR)).waitToBeClickable().click(); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/services/extended-serverinfo.interface.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | export interface IExtendedServerInfo { 17 | name: string; 18 | serverGuid: string; 19 | sessionCookie: string; 20 | thumbprint: string; 21 | version: string; 22 | } 23 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export * from './resources.path'; 18 | export * from './portlets.text'; 19 | export * from './vicvms'; 20 | export * from './create-vch-wizard'; 21 | export * from './delete-vch-modal'; 22 | export * from './nodetype'; 23 | -------------------------------------------------------------------------------- /OWNERS.md: -------------------------------------------------------------------------------- 1 | This file documents the current people responsible for maintaining this 2 | repository, and their roles. This provides context to help the broader community 3 | better understand who they are interacting with (e.g., when reading, creating, 4 | or commenting on issues and pull requests). 5 | 6 | This document is not intended to list all contributors, and many important and 7 | valued members of the extended team are not listed below. 8 | 9 | Please see [CONTRIBUTING.md](CONTRIBUTING.md) for general contribution 10 | guidelines and [Contributors](https://github.com/vmware/vic/graphs/contributors) 11 | for a more complete list of contributors. 12 | 13 | Core Maintainers 14 | ================ 15 | 16 | * Steven Ren ([@renmaosheng](https://github.com/renmaosheng)), Engineering Manager 17 | * James Zabala ([@clouderati](https://github.com/clouderati)), Product Manager 18 | * Mia Zhou ([zhoumeina](https://github.com/zhoumeina)) 19 | 20 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/vch-view/vch-log-view/vch-log-view.template.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | Deployment log 6 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
{{ log }}
22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/common/MaximizeWindowStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.common; 2 | 3 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 4 | 5 | import java.awt.Toolkit; 6 | 7 | import org.openqa.selenium.Dimension; 8 | import org.openqa.selenium.Point; 9 | 10 | public class MaximizeWindowStep extends UiTestStep { 11 | private static final int TARGET_WINDOW_WIDTH = 1280; 12 | private static final int TARGET_WINDOW_HEIGHT = 900; 13 | 14 | @Override 15 | public String getDescription() { 16 | return String.format("%s", "Sets the browser window to a certain size"); 17 | } 18 | 19 | @Override 20 | public void execute() throws Throwable { 21 | Dimension screenSize = new Dimension( 22 | TARGET_WINDOW_WIDTH, TARGET_WINDOW_HEIGHT); 23 | getDriver().manage().window().setSize(screenSize); 24 | getDriver().manage().window().maximize(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export * from './app-config'; 18 | export * from './app-alert.component'; 19 | export * from './app-alert.service'; 20 | export * from './globals.service'; 21 | export * from './refresh.service'; 22 | export * from './i18n.service'; 23 | export * from './vic-i18n.service'; 24 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/vicvms.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const VM_GUESTMEMORYUSAGE = 'guestMemoryUsage'; 18 | export const VM_OVERALLCPUUSAGE = 'overallCpuUsage'; 19 | export const VM_COMMITTEDSTORAGE = 'committedStorage'; 20 | export const DOCKER_ENGINE_PORT_TLS = '2376'; 21 | export const DOCKER_ENGINE_PORT_NOTLS = '2375'; 22 | -------------------------------------------------------------------------------- /h5c/vic-service/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | vic-service 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.springframework.ide.eclipse.core.springbuilder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.virgo.ide.facet.core.bundlenature 26 | org.springframework.ide.eclipse.core.springnature 27 | org.eclipse.jdt.core.javanature 28 | org.eclipse.wst.common.project.facet.core.nature 29 | 30 | 31 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/RootInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model; 19 | 20 | public class RootInfo { 21 | public String uiVersion; 22 | 23 | public RootInfo() { 24 | // an empty constructor is required for the AMF serialization to work 25 | } 26 | 27 | public RootInfo(String[] data) { 28 | this.uiVersion = data[0]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/resources/Slack-Util.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Documentation This resource contains all keywords related to reading, posting to Slack channels 17 | 18 | *** Keywords *** 19 | Post Message To Slack Channel 20 | [Arguments] ${channel} ${message} 21 | ${out}= Run curl -s -d "payload={\\"channel\\": \\"#${channel}\\", \\"text\\": \\"${message}\\"}" "%{SLACK_URL}" -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/OpenVicWorkspaceLandingPageStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | 5 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 6 | 7 | public class OpenVicWorkspaceLandingPageStep extends UiTestStep { 8 | private static final long serialVersionUID = 1L; 9 | private static final String XPATH_DATAGRID_VIC_SELECTOR = 10 | "//div[@vx-extension-view-id=\"com.vmware.vic.objectView.list\"]" + 11 | "//div[contains(@class, \"k-grid-content\")][1]" + 12 | "//td[@role=\"gridcell\"][1]//a"; 13 | 14 | @Override 15 | public String getDescription() { 16 | return String.format("%s", "Clicks 'vSphere Integrated Containers' in the data grid to naviagate to the landing page"); 17 | } 18 | 19 | @Override 20 | public void execute() throws Throwable { 21 | element(By.xpath(XPATH_DATAGRID_VIC_SELECTOR)) 22 | .waitToBeClickable().click(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /tests/check-org-membership.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2020-2021 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | set -e 18 | 19 | echo ${DRONE_COMMIT_AUTHOR} 20 | 21 | if [ ! $(curl --silent -H "Authorization: token $GITHUB_AUTOMATION_API_KEY" "https://api.github.com/orgs/vmware/members/${DRONE_COMMIT_AUTHOR}") ]; then 22 | echo "checked origin membership successfully" 23 | else 24 | echo "failed to check origin membership" 25 | exit 1 26 | fi 27 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/delete-vch-modal.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { environment } from '../../../environments/environment'; 17 | 18 | export const DELETE_VCH_MODAL_URL = 19 | `/ui/vic/resources/dist/index.html?view=delete-vch`; 20 | export const DELETE_VCH_MODAL_WIDTH = 600; 21 | export const DELETE_VCH_MODAL_HEIGHT = 360; 22 | export const DELETE_VCH_MODAL_ERROR_EVENT = 'delete-vch-modal.error'; 23 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/portlets.text.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const DEFAULT_CONTAINER_NAME_LABEL = 'Container'; 18 | export const DEFAULT_CONTAINER_IMAGE_LABEL = 'Image'; 19 | export const DEFAULT_CONTAINER_PORT_MAPPING_LABEL = 'Port Mapping'; 20 | export const DEFAULT_VCH_DOCKER_ENDPOINT_LABEL = 'Docker API endpoint'; 21 | export const DEFAULT_VCH_VCH_ADMIN_PORTAL_LABEL = 'VCH Admin portal'; 22 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/main.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { enableProdMode } from '@angular/core'; 18 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 19 | 20 | import { AppModule } from './app/app.module'; 21 | import { environment } from './environments/environment'; 22 | 23 | if (environment.production) { 24 | enableProdMode(); 25 | } 26 | 27 | platformBrowserDynamic().bootstrapModule(AppModule); 28 | -------------------------------------------------------------------------------- /tests/resources/dockerfiles/Dockerfile.1-19-Docker-Verify-Volume-Files: -------------------------------------------------------------------------------- 1 | # Copyright 2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | # docker build --no-cache -t jakedsouza/group-1-19-docker-verify-volume-files:1.0 -f Dockerfile.1-19-Docker-Verify-Volume-Files . 16 | # docker push jakedsouza/group-1-19-docker-verify-volume-files:1.0 17 | 18 | FROM alpine:latest 19 | 20 | RUN mkdir -p /etc/example/thisshouldexist 21 | RUN echo "TestFile" >> /etc/example/testfile.txt 22 | 23 | VOLUME ["/etc/example"] 24 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/array-utils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export function flattenArray(list: Array) { 18 | return list.reduce((a, b) => { 19 | return a.concat(Array.isArray(b) ? flattenArray(b) : b); 20 | }, []) 21 | } 22 | 23 | export function compareFn(a: any, b: any) { 24 | if (a.name < b.name) { 25 | return -1; 26 | } 27 | if (a.name > b.name) { 28 | return 1; 29 | } 30 | // names must be equal 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /tests/test-cases/Group1-VCH-Creation-Wizard/1-01-Basic-VCH-Create.md: -------------------------------------------------------------------------------- 1 | Test 1-01 - Basic VCH Lifecycle 2 | ======= 3 | 4 | # Purpose: 5 | To verify that a basic VCH lifecycle (create, edit(tbd), delete) succeeds 6 | 7 | # References: 8 | 9 | # Environment: 10 | This test requires that a vSphere server is running and available and VIC OVA with creation wizard is installed 11 | 12 | # Test Steps: 13 | 0. Login and navigate to VIC plugin 14 | 1. Navigate to the VCH Creation Wizard 15 | 2. Click through each step of the VCH Creation Wizard using defaults in all cases except datastore and networks that you must select, and finish. 16 | 3. Verify VCH found and ready 17 | 4. Navigate to VCH in vcenter 18 | 5. Check Action menu for VIC items (create, edit, delete) 19 | 6. Click to edit (tbd) 20 | 7. Click through each step of the VCH Edit Wizard, and finish (tbd) 21 | 8. Verify VCH has been reconfigured (tbd) 22 | 9. Navigate to VCH list 23 | 10. Delete VCH 24 | 25 | # Expected Outcome: 26 | * All steps should be successful 27 | 28 | # Possible Problems: 29 | Timeouts 30 | Certificates (IE11) 31 | API errors 32 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // The file contents for the current environment will overwrite these during build. 18 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 19 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 20 | // The list of which env maps to which file can be found in `.angular-cli.json`. 21 | 22 | export const environment = { 23 | production: false 24 | }; 25 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/disable-cookie-xsrf-strategy.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { Injectable } from '@angular/core'; 17 | import { XSRFStrategy, Request } from '@angular/http'; 18 | 19 | /** 20 | * Disables XSRF Strategy set enabled by default to prevent issue 195 21 | * (see https://github.com/vmware/vic-ui/issues/195) 22 | */ 23 | 24 | @Injectable() 25 | export class DisableCookieXSRFStrategy implements XSRFStrategy { 26 | configureRequest(req: Request): void {} 27 | } 28 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/constants/VsphereObjects.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model.constants; 19 | 20 | public class VsphereObjects { 21 | public static final String VirtualMachine = "VirtualMachine"; 22 | public static final String VmPropertyValueKey = "vm"; 23 | public static final String NamePropertyKey = "name"; 24 | public static final String VirtualApp = "VirtualApp"; 25 | public static final String ResourcePool = "ResourcePool"; 26 | } 27 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/array-utils.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Internal imports 18 | import { flattenArray } from './array-utils'; 19 | 20 | // Tests 21 | describe('Array Utils', () => { 22 | it('should flatten array', () => { 23 | const inputArray = [[1, 2], [3, 4, 5], [6, 7, 8, 9]]; 24 | const flattenedArray = [1, 2, 3, 4, 5, 6, 7, 8, 9]; 25 | const result = flattenArray(inputArray); 26 | 27 | expect(result).toEqual(flattenedArray); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/detection.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /* get client operating system */ 18 | 19 | export function getClientOS(): string { 20 | let clientOS = ''; 21 | if (navigator.appVersion.indexOf('Win') !== -1) { 22 | clientOS = 'windows'; 23 | }; 24 | if (navigator.appVersion.indexOf('Mac') !== -1) { 25 | clientOS = 'darwin'; 26 | }; 27 | if (navigator.appVersion.indexOf('Linux') !== -1) { 28 | clientOS = 'linux'; 29 | }; 30 | return clientOS; 31 | } 32 | -------------------------------------------------------------------------------- /tests/robot-indices/Collections.index: -------------------------------------------------------------------------------- 1 | Append To List 2 | Combine Lists 3 | Convert To Dictionary 4 | Convert To List 5 | Copy Dictionary 6 | Copy List 7 | Count Values In List 8 | Dictionaries Should Be Equal 9 | Dictionary Should Contain Item 10 | Dictionary Should Contain Key 11 | Dictionary Should Contain Sub Dictionary 12 | Dictionary Should Contain Value 13 | Dictionary Should Not Contain Key 14 | Dictionary Should Not Contain Value 15 | Get Dictionary Items 16 | Get Dictionary Keys 17 | Get Dictionary Values 18 | Get From Dictionary 19 | Get From List 20 | Get Index From List 21 | Get Match Count 22 | Get Matches 23 | Get Slice From List 24 | Insert Into List 25 | Keep In Dictionary 26 | List Should Contain Sub List 27 | List Should Contain Value 28 | List Should Not Contain Duplicates 29 | List Should Not Contain Value 30 | Lists Should Be Equal 31 | Log Dictionary 32 | Log List 33 | Pop From Dictionary 34 | Remove Duplicates 35 | Remove From Dictionary 36 | Remove From List 37 | Remove Values From List 38 | Reverse List 39 | Set List Value 40 | Set To Dictionary 41 | Should Contain Match 42 | Should Not Contain Match 43 | Sort List -------------------------------------------------------------------------------- /.drone.local.plugin.yml: -------------------------------------------------------------------------------- 1 | workspace: 2 | base: /go 3 | path: src/github.com/vmware/vic 4 | 5 | pipeline: 6 | clone: 7 | image: plugins/git 8 | tags: true 9 | recursive: false 10 | vic-uia: 11 | image: ${TEST_BUILD_IMAGE=gcr.io/eminent-nation-87317/vic-integration-test:1.33} 12 | pull: true 13 | environment: 14 | BIN: bin 15 | GOPATH: /go 16 | SHELL: /bin/bash 17 | TEST_DATASTORE: ${TEST_DATASTORE} 18 | TEST_RESOURCE: ${TEST_RESOURCE} 19 | GOVC_INSECURE: true 20 | BUILD_NUMBER: ${buildNumber} 21 | TEST_VSPHERE_VER: #TEST_VSPHERE_VER 22 | TEST_VCSA_BUILD: #TEST_VCSA_BUILD 23 | TEST_OS: #TEST_OS 24 | SELENIUM_BROWSER: #SELENIUM_BROWSER 25 | BROWSER_NORMALIZED_NAME: #BROWSER_NORMALIZED_NAME 26 | UI_TEST_CASES_FOLDER: tests/test-cases/Group18-VIC-UI 27 | TEST_RESULTS_FOLDER: #TEST_RESULTS_FOLDER 28 | commands: 29 | - apt-get update && apt-get install -yq maven netcat 30 | - pip install pexpect robotframework-selenium2library 31 | - cd $UI_TEST_CASES_FOLDER 32 | - robot -C ansi -d ../../../$TEST_RESULTS_FOLDER 18-4-VIC-UI-Plugin-tests.robot 33 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/app-config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Application level constants can be kept here 18 | export interface AppConfig { 19 | pluginName: string; 20 | bundleName: string; 21 | packageName: string; 22 | } 23 | 24 | export const APP_CONFIG: AppConfig = { 25 | // Names used during plugin generation, can be changed once here 26 | // and the rest of the generated .ts and .html code will use them. 27 | pluginName: 'vic', 28 | bundleName: 'com_vmware_vic', 29 | packageName: 'com.vmware.vic' 30 | }; 31 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/VerifySuccessfulEntryStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.TimeoutException; 5 | 6 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 7 | 8 | public class VerifySuccessfulEntryStep extends UiTestStep { 9 | private static final long serialVersionUID = 1L; 10 | private static final String XPATH_VIC_HEADER_SELECTOR = 11 | "//div/span[text()=\"vSphere Integrated Containers\"]"; 12 | 13 | @Override 14 | public String getDescription() { 15 | return String.format("%s", "Verifies if the landing page of VIC Workspace is shown"); 16 | } 17 | 18 | @Override 19 | public void execute() throws Throwable { 20 | verify.fatalTrue(hasVicHeaderText(), 21 | String.format("Header should exist for VIC")); 22 | } 23 | 24 | private boolean hasVicHeaderText() { 25 | boolean result = true; 26 | try { 27 | element(By.xpath(XPATH_VIC_HEADER_SELECTOR)).waitToBeVisible(); 28 | } catch (TimeoutException e) { 29 | return false; 30 | } 31 | return result; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /h5c/vic/build-war.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | if [ -z "$ANT_HOME" ] || [ ! -f "${ANT_HOME}"/bin/ant ] 17 | then 18 | echo BUILD FAILED: You must set the environment variable ANT_HOME to your Apache Ant folder 19 | exit 1 20 | fi 21 | 22 | if [ -z "$VSPHERE_SDK_HOME" ] || [ ! -f "${VSPHERE_SDK_HOME}"/libs/vsphere-client-lib.jar ] 23 | then 24 | echo BUILD FAILED: You must set the environment variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 25 | exit 1 26 | fi 27 | 28 | "${ANT_HOME}"/bin/ant -f build-war.xml 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /tests/test-cases/Group1-VCH-Creation-Wizard/1-02-Basic-VCH-Create-Host-Affinity.md: -------------------------------------------------------------------------------- 1 | Test 1-02 - Basic VCH Lifecycle with Host Affinity Enabled 2 | ======= 3 | 4 | # Purpose: 5 | To verify that a basic VCH lifecycle (create, edit(tbd), delete) succeeds 6 | 7 | # References: 8 | 9 | # Environment: 10 | This test requires that a vSphere server is running and available and VIC OVA with creation wizard is installed 11 | 12 | # Test Steps: 13 | 0. Login and navigate to VIC plugin 14 | 1. Navigate to the VCH Creation Wizard 15 | 2. Click through each step of the VCH Creation Wizard using defaults in all 16 | cases except compute resource that you must select host affinity, datastore 17 | and networks that you must select the respective values and finish. 18 | 3. Verify VCH found and ready 19 | 4. Navigate to VCH in vcenter 20 | 5. Navigate to related objects and select Cluster 21 | 6. Navigate to Host Group/Virtual Machine 22 | 7. Check the VCH is present on as a Host Group / Virtual Machine 23 | 8. Navigate to VCH list 24 | 9. Delete VCH 25 | 26 | # Expected Outcome: 27 | * All steps should be successful 28 | 29 | # Possible Problems: 30 | Timeouts 31 | Certificates (IE11) 32 | API errors 33 | -------------------------------------------------------------------------------- /h5c/vic/build-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | if [ -z "$ANT_HOME" ] || [ ! -f "${ANT_HOME}"/bin/ant ] 17 | then 18 | echo BUILD FAILED: You must set the environment variable ANT_HOME to your Apache Ant folder 19 | exit 1 20 | fi 21 | 22 | if [ -z "$VSPHERE_SDK_HOME" ] || [ ! -f "${VSPHERE_SDK_HOME}"/libs/vsphere-client-lib.jar ] 23 | then 24 | echo BUILD FAILED: You must set the environment variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 25 | exit 1 26 | fi 27 | 28 | "${ANT_HOME}"/bin/ant -f build-resources.xml 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/compute-capacity/compute-capacity.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/@clr/ui/src/color/variables.color"; 2 | 3 | :host ::ng-deep clr-tree-node { 4 | .clr-treenode-link, 5 | .clr-treenode-caret { 6 | margin-top: 0; 7 | margin-bottom: 0; 8 | } 9 | &.rootNode > .clr-treenode-content { 10 | padding-left: 0px !important; 11 | } 12 | } 13 | 14 | #compute-resource-selector { 15 | border: 2px solid $clr-lighter-midtone-gray; 16 | height: 150px; 17 | overflow: auto; 18 | 19 | &.invalid { 20 | border-color: $clr-red; 21 | } 22 | } 23 | 24 | .affinity-disabled { 25 | color: #ccc; 26 | } 27 | 28 | .affinity-label { 29 | font-size: .66667rem; 30 | letter-spacing: .01em; 31 | font-weight: 400; 32 | color: #000; 33 | margin-top: 1rem; 34 | } 35 | 36 | .affinity-help { 37 | height: 10px; 38 | } 39 | 40 | .affinity-help button { 41 | margin-top: 0px !important; 42 | } 43 | 44 | .affinity-alerts .alert-icon { 45 | color: #c92100; 46 | } 47 | 48 | .affinity-alerts .alert-items { 49 | padding-left: 0px; 50 | padding-top: 0px; 51 | } 52 | 53 | .affinity-alerts .alert-item { 54 | margin-bottom: 0px; 55 | } 56 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/e2e/pages/common.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const defaultTimeout = 10000; 18 | export const modalWizard = '.clr-wizard-stepnav'; 19 | export const iframeTabs = 'div.outer-tab-content iframe.sandbox-iframe'; 20 | export const namePrefix = 'virtual-container-host-'; 21 | export const menuLabel = '.vui-menuitem-label-text'; 22 | export const tabSummary = 'a.summary-action-link'; 23 | export const extendedTimeout = 10000; 24 | export const opsTimeout = 80000; 25 | export const username = 'administrator@vsphere.local'; 26 | export const password = 'Bl*ckwalnut0'; 27 | 28 | -------------------------------------------------------------------------------- /h5c/vic/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | vic 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.ui.externaltools.ExternalToolBuilder 10 | full,incremental, 11 | 12 | 13 | LaunchConfigHandle 14 | <project>/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | com.eclipsesource.jshint.ui.builder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.virgo.ide.facet.core.bundlenature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.wst.common.project.facet.core.nature 33 | org.eclipse.wst.jsdt.core.jsNature 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/resources/Drone-Util.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Documentation This resource contains any keywords related to using the Drone CI Build System 17 | 18 | *** Keywords *** 19 | Get State Of Drone Build 20 | [Arguments] ${num} 21 | Return From Keyword If '${num}' == '0' local 22 | ${out}= Run drone build info vmware/vic ${num} --format {{.Status}} 23 | [Return] ${out} 24 | 25 | Get Title of Drone Build 26 | [Arguments] ${num} 27 | Return From Keyword If '${num}' == '0' local 28 | ${out}= Run drone build info vmware/vic ${num} --format {{ .Message }} 29 | [Return] ${out} 30 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/model-checker.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Internal imports 18 | import { isUploadableFileObject } from './model-checker'; 19 | 20 | // Tests 21 | describe('Model Checker', () => { 22 | it('should check if object is uploadable', () => { 23 | const uploadableObj = {'name': 'test', 'content': 'test'} 24 | let result = isUploadableFileObject(uploadableObj); 25 | expect(result).toBeTruthy(); 26 | 27 | const nonUploadableObj = {'prop1': 'test', 'prop2': 'test'} 28 | result = isUploadableFileObject(nonUploadableObj); 29 | expect(result).toBeFalsy(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/interfaces/compute.resource.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export interface ResourceBasicInfo { 18 | serverGuid: string; 19 | type: string; 20 | value: string; 21 | } 22 | 23 | export interface ComputeResource extends ResourceBasicInfo { 24 | name: string; 25 | parent: ResourceBasicInfo, 26 | resourcePool: ResourceBasicInfo, 27 | id?: string; 28 | objRef?: string; 29 | text?: string; 30 | datacenterObjRef?: string; 31 | isEmpty?: boolean; 32 | childs?: ResourceBasicInfo[]; 33 | aliases?: string[]; 34 | nodeTypeId?: string; 35 | rootParentComputeResource?: ComputeResource; 36 | hasChildren?: boolean; 37 | } 38 | -------------------------------------------------------------------------------- /h5c/vic-service/build-java.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Mac OS script 17 | # Note: if Ant runs out of memory try defining ANT_OPTS=-Xmx512M 18 | 19 | if [ -z "$ANT_HOME" ] || [ ! -f "${ANT_HOME}"/bin/ant ] 20 | then 21 | echo BUILD FAILED: You must set the environment variable ANT_HOME to your Apache Ant folder 22 | exit 1 23 | fi 24 | 25 | if [ -z "$VSPHERE_SDK_HOME" ] || [ ! -f "${VSPHERE_SDK_HOME}"/libs/vsphere-client-lib.jar ] 26 | then 27 | echo BUILD FAILED: You must set the environment variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 28 | exit 1 29 | fi 30 | 31 | "${ANT_HOME}"/bin/ant -f build-java.xml 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-Vendor: VMware 3 | Bundle-Version: 1.0.0 4 | Tool: Bundlor 1.1.0.RELEASE 5 | Bundle-Name: vic-service 6 | Bundle-ManifestVersion: 2 7 | Bundle-SymbolicName: com.vmware.vic.service 8 | Export-Package: com.vmware.vic.services;version="1.0.0", 9 | com.vmware.vic.mvc;version="1.0.0", 10 | com.vmware.vic.filters;version="1.0.0", 11 | com.vmware.vic;version="1.0.0" 12 | Import-Package: com.google.gson;version="2.3.1", 13 | com.vmware.vim.binding.vmodl;version=0, 14 | com.vmware.vim25;version="[6.0.0,7)", 15 | com.vmware.vise.core.model;version=0, 16 | com.vmware.vise.data;version=0, 17 | com.vmware.vise.data.query;version=0, 18 | com.vmware.vise.data.uri;version=0, 19 | com.vmware.vise.security;version=0, 20 | com.vmware.vise.usersession;version=0, 21 | com.vmware.vise.vim.data;version=0, 22 | javax.net.ssl;version=0, 23 | javax.servlet.http;version="3.0", 24 | org.apache.commons.logging;version="1.1.1", 25 | org.springframework.beans.factory.annotation, 26 | org.springframework.web.context.support, 27 | org.springframework.beans.factory.config, 28 | org.springframework.web.context, 29 | org.springframework.http, 30 | org.springframework.stereotype, 31 | org.springframework.web.bind.annotation 32 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/shared.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { ClarityModule } from '@clr/angular'; 18 | import { CommonModule } from '@angular/common'; 19 | import { FormsModule } from '@angular/forms'; 20 | import { NgModule } from '@angular/core'; 21 | import { VicOvaVerificationComponent } from './vic-ova-verification.component'; 22 | 23 | @NgModule({ 24 | imports: [ 25 | CommonModule, 26 | ClarityModule, 27 | FormsModule 28 | ], 29 | declarations: [ 30 | VicOvaVerificationComponent 31 | ], 32 | providers: [], 33 | exports: [ 34 | VicOvaVerificationComponent 35 | ] 36 | }) 37 | export class SharedModule {} 38 | -------------------------------------------------------------------------------- /h5c/vic/build-plugin-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Mac OS script 17 | # Note: if Ant runs out of memory try defining ANT_OPTS=-Xmx512M 18 | 19 | if [ -z "$ANT_HOME" ] || [ ! -f "${ANT_HOME}"/bin/ant ] 20 | then 21 | echo BUILD FAILED: You must set the environment variable ANT_HOME to your Apache Ant folder 22 | exit 1 23 | fi 24 | 25 | if [ -z "$VSPHERE_SDK_HOME" ] || [ ! -f "${VSPHERE_SDK_HOME}"/libs/vsphere-client-lib.jar ] 26 | then 27 | echo BUILD FAILED: You must set the environment variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 28 | exit 1 29 | fi 30 | 31 | "${ANT_HOME}"/bin/ant -f build-plugin-package.xml 32 | 33 | exit 0 34 | -------------------------------------------------------------------------------- /tests/robot-indices/OperatingSystem.index: -------------------------------------------------------------------------------- 1 | Append To Environment Variable 2 | Append To File 3 | Copy Directory 4 | Copy File 5 | Copy Files 6 | Count Directories In Directory 7 | Count Files In Directory 8 | Count Items In Directory 9 | Create Binary File 10 | Create Directory 11 | Create File 12 | Directory Should Be Empty 13 | Directory Should Exist 14 | Directory Should Not Be Empty 15 | Directory Should Not Exist 16 | Empty Directory 17 | Environment Variable Should Be Set 18 | Environment Variable Should Not Be Set 19 | File Should Be Empty 20 | File Should Exist 21 | File Should Not Be Empty 22 | File Should Not Exist 23 | Get Binary File 24 | Get Environment Variable 25 | Get Environment Variables 26 | Get File 27 | Get File Size 28 | Get Modified Time 29 | Grep File 30 | Join Path 31 | Join Paths 32 | List Directories In Directory 33 | List Directory 34 | List Files In Directory 35 | Log Environment Variables 36 | Log File 37 | Move Directory 38 | Move File 39 | Move Files 40 | Normalize Path 41 | Remove Directory 42 | Remove Environment Variable 43 | Remove File 44 | Remove Files 45 | Run 46 | Run And Return Rc 47 | Run And Return Rc And Output 48 | Set Environment Variable 49 | Set Modified Time 50 | Should Exist 51 | Should Not Exist 52 | Split Extension 53 | Split Path 54 | Touch 55 | Wait Until Created 56 | Wait Until Removed -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant/ 2 | .vscode/ 3 | .cover/ 4 | bin/ 5 | binary/ 6 | vic_binaries*.tar.gz 7 | secrets.yml 8 | test_secrets.yml 9 | nightly_ui_tests_secrets.yml 10 | secrets-e2e.yml 11 | vic-ci-logs.key 12 | install-*.tar.gz 13 | *.log 14 | log.html 15 | report.html 16 | *.gas 17 | *.pyc 18 | package.list 19 | *container-logs.zip 20 | *certs.zip 21 | integration_logs* 22 | vmware-ovftool 23 | .DS_Store 24 | 25 | # generally a bad idea to check certificates into repos - whitelist if needed 26 | **/*.pem 27 | 28 | lib/apiservers/portlayer/client/ 29 | lib/apiservers/portlayer/cmd 30 | lib/apiservers/portlayer/models 31 | lib/apiservers/portlayer/restapi/*.go 32 | lib/apiservers/portlayer/restapi/operations 33 | !lib/apiservers/portlayer/restapi/configure_port_layer.go 34 | lib/config/dynamic/admiral/client 35 | lib/config/dynamic/admiral/models 36 | lib/config/dynamic/admiral/operations 37 | 38 | tests/.project 39 | # go test binaries 40 | *.test 41 | 42 | # Intellij files 43 | *.iml 44 | 45 | *.zip 46 | \$* 47 | 48 | # vic plugin jar / war files 49 | scripts/plugin-manifest 50 | scripts/vsphere-client-serenity/ 51 | scripts/plugin-packages/ 52 | scripts/upload-to-staging-fileserver.sh 53 | test.secrets 54 | **/*.swf 55 | **/*.jar 56 | **/*.war 57 | **/bin 58 | **/target/* 59 | **/unittest-results/* 60 | 61 | # IDE configs files 62 | .idea/ 63 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/constants/Vch.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model.constants; 19 | 20 | public class Vch { 21 | public static final String VM_IS_USING_TLS = "isUsingTls"; 22 | public static final String VM_CLIENT_IP = "clientIp"; 23 | public static final String VM_VCH_IP = "vchIp"; 24 | public static final String VM_EXTRACONFIG_VCH_KEY = "init/common/name"; 25 | public static final String VM_EXTRACONFIG_CLIENT_IP_KEY = 26 | "guestinfo.vice..init.networks|client.assigned.IP"; 27 | public static final String VM_EXTRACONFIG_DOCKER_PERSONALITY_ARGS_KEY = 28 | "guestinfo.vice./init/sessions|docker-personality/cmd/Args~"; 29 | } 30 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/vm.constants.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const VM_PROPERTIES_TO_EXTRACT = [ 18 | 'name', 19 | 'isVCH', 20 | 'isContainer', 21 | 'summary.runtime.powerState', 22 | 'config.extraConfig' 23 | ]; 24 | export const CONTAINER_VM_IMAGE_NAME_KEY = 'guestinfo.vice./repo'; 25 | export const CONTAINER_VM_PORTMAPPING_KEY = 'guestinfo.vice./networks|bridge/ports~'; 26 | export const CONTAINER_PRETTY_NAME_KEY = 'common/name'; 27 | export const VCH_VM_CLIENT_IP_KEY = 'guestinfo.vice..init.networks|client.assigned.IP'; 28 | export const DOCKER_PERSONALITY_ARGS_KEY = 'guestinfo.vice./init/sessions|docker-personality/cmd/Args~'; 29 | export const VCH_VM_LOG_PORT = ':2378'; 30 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/VicUserSessionServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.services; 19 | 20 | import com.vmware.vic.PropFetcher; 21 | 22 | public class VicUserSessionServiceImpl implements VicUserSessionService { 23 | private final PropFetcher _propFetcher; 24 | public VicUserSessionServiceImpl(PropFetcher propFetcher) { 25 | if (propFetcher == null) { 26 | throw new IllegalArgumentException("constructor argument cannot be null"); 27 | } 28 | this._propFetcher = propFetcher; 29 | } 30 | 31 | @Override 32 | public boolean isCurrentUserVsphereAdmin() { 33 | return this._propFetcher.isSessionUserVsphereAdmin(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/ui-actions/ui-actions.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import {NgModule} from '@angular/core'; 18 | import {RouterModule, Routes} from '@angular/router'; 19 | import {CommonModule} from '@angular/common'; 20 | import {ClarityModule} from '@clr/angular'; 21 | import {UiActionsComponent} from './ui-actions.component'; 22 | 23 | const routes: Routes = [ 24 | {path: ':objectId/:actionId', component: UiActionsComponent} 25 | ]; 26 | 27 | @NgModule({ 28 | imports: [ 29 | CommonModule, 30 | ClarityModule, 31 | RouterModule.forChild(routes) 32 | ], 33 | declarations: [ 34 | UiActionsComponent 35 | ], 36 | exports: [ 37 | UiActionsComponent 38 | ] 39 | }) 40 | export class UiActionsModule { } 41 | -------------------------------------------------------------------------------- /h5c/vic/build-war.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2017 VMware, Inc. All Rights Reserved. 3 | REM 4 | REM Licensed under the Apache License, Version 2.0 (the "License"); 5 | REM you may not use this file except in compliance with the License. 6 | REM You may obtain a copy of the License at 7 | REM 8 | REM http://www.apache.org/licenses/LICENSE-2.0 9 | REM 10 | REM Unless required by applicable law or agreed to in writing, software 11 | REM distributed under the License is distributed on an "AS IS" BASIS, 12 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | REM See the License for the specific language governing permissions and 14 | REM limitations under the License. 15 | 16 | @setlocal 17 | @IF not defined ANT_HOME ( 18 | @echo BUILD FAILED: You must set the env variable ANT_HOME to your Apache Ant folder 19 | goto end 20 | ) 21 | @IF not defined VSPHERE_SDK_HOME ( 22 | @echo BUILD FAILED: You must set the env variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 23 | goto end 24 | ) 25 | @IF not exist "%VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar" ( 26 | @echo BUILD FAILED: VSPHERE_SDK_HOME is not set to a valid vSphere Client SDK folder 27 | @echo %VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar is missing 28 | goto end 29 | ) 30 | 31 | @call "%ANT_HOME%\bin\ant" -f build-war.xml 32 | 33 | :end 34 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/constants/Container.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model.constants; 19 | 20 | public class Container { 21 | public static final String VM_EXTRACONFIG_CONTAINER_KEY = "common/name"; 22 | public static final String VM_EXTRACONFIG_IMAGE_NAME_KEY = 23 | "guestinfo.vice./repo"; 24 | public static final String VM_EXTRACONFIG_PORTMAPPING_KEY = 25 | "guestinfo.vice./networks|bridge/ports~"; 26 | public static final String VM_CONTAINERNAME_KEY = "containerName"; 27 | public static final String VM_IMAGENAME_KEY = "imageName"; 28 | public static final String VM_PORTMAPPING_KEY = "portMapping"; 29 | public static final String PARENT_NAME_KEY = "parentObjectName"; 30 | } 31 | -------------------------------------------------------------------------------- /h5c/vic/build-resources.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2017 VMware, Inc. All Rights Reserved. 3 | REM 4 | REM Licensed under the Apache License, Version 2.0 (the "License"); 5 | REM you may not use this file except in compliance with the License. 6 | REM You may obtain a copy of the License at 7 | REM 8 | REM http://www.apache.org/licenses/LICENSE-2.0 9 | REM 10 | REM Unless required by applicable law or agreed to in writing, software 11 | REM distributed under the License is distributed on an "AS IS" BASIS, 12 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | REM See the License for the specific language governing permissions and 14 | REM limitations under the License. 15 | 16 | @setlocal 17 | @IF not defined ANT_HOME ( 18 | @echo BUILD FAILED: You must set the env variable ANT_HOME to your Apache Ant folder 19 | goto end 20 | ) 21 | @IF not defined VSPHERE_SDK_HOME ( 22 | @echo BUILD FAILED: You must set the env variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 23 | goto end 24 | ) 25 | @IF not exist "%VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar" ( 26 | @echo BUILD FAILED: VSPHERE_SDK_HOME is not set to a valid vSphere Client SDK folder 27 | @echo %VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar is missing 28 | goto end 29 | ) 30 | 31 | @call "%ANT_HOME%\bin\ant" -f build-resources.xml 32 | 33 | :end 34 | -------------------------------------------------------------------------------- /h5c/vic/build-plugin-package.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2017 VMware, Inc. All Rights Reserved. 3 | REM 4 | REM Licensed under the Apache License, Version 2.0 (the "License"); 5 | REM you may not use this file except in compliance with the License. 6 | REM You may obtain a copy of the License at 7 | REM 8 | REM http://www.apache.org/licenses/LICENSE-2.0 9 | REM 10 | REM Unless required by applicable law or agreed to in writing, software 11 | REM distributed under the License is distributed on an "AS IS" BASIS, 12 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | REM See the License for the specific language governing permissions and 14 | REM limitations under the License. 15 | 16 | @setlocal 17 | @IF not defined ANT_HOME ( 18 | @echo BUILD FAILED: You must set the env variable ANT_HOME to your Apache Ant folder 19 | goto end 20 | ) 21 | @IF not defined VSPHERE_SDK_HOME ( 22 | @echo BUILD FAILED: You must set the env variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 23 | goto end 24 | ) 25 | @IF not exist "%VSPHERE_SDK_HOME%\libs\vsphere-client-lib.swc" ( 26 | @echo BUILD FAILED: VSPHERE_SDK_HOME is not set to a valid vSphere Client SDK folder 27 | @echo %VSPHERE_SDK_HOME%\libs\vsphere-client-lib.swc is missing 28 | goto end 29 | ) 30 | 31 | @call "%ANT_HOME%\bin\ant" -f build-plugin-package.xml 32 | 33 | :end 34 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/services/http-interceptor.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Request, XHRBackend, RequestOptions, Response, Http, RequestOptionsArgs, Headers } from '@angular/http'; 3 | import { Observable, throwError as observableThrowError } from 'rxjs'; 4 | import { catchError } from 'rxjs/operators'; 5 | import { GlobalsService } from '../shared/index'; 6 | import { VCH_VIEW_ID, VIC_OBJ_ID } from '../shared/constants/resources.path'; 7 | 8 | @Injectable() 9 | export class HttpInterceptorService extends Http { 10 | 11 | constructor( 12 | private globalsService: GlobalsService, 13 | backend: XHRBackend, 14 | defaultOptions: RequestOptions 15 | ) { 16 | super(backend, defaultOptions); 17 | } 18 | 19 | request(url: string | Request, options?: RequestOptionsArgs): Observable { 20 | return super.request(url, options).pipe(catchError((error: Response) => { 21 | if ((error.status === 401 || error.status === 403)) { 22 | console.error('The authentication session expired or the user is not authorized.'); 23 | // send nav request to H5 client to trigger session alert 24 | this.globalsService 25 | .getWebPlatform() 26 | .sendNavigationRequest( 27 | VCH_VIEW_ID, 28 | VIC_OBJ_ID 29 | ); 30 | } 31 | return observableThrowError(error); 32 | })); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /h5c/vic-service/build-java.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2017 VMware, Inc. All Rights Reserved. 3 | REM 4 | REM Licensed under the Apache License, Version 2.0 (the "License"); 5 | REM you may not use this file except in compliance with the License. 6 | REM You may obtain a copy of the License at 7 | REM 8 | REM http://www.apache.org/licenses/LICENSE-2.0 9 | REM 10 | REM Unless required by applicable law or agreed to in writing, software 11 | REM distributed under the License is distributed on an "AS IS" BASIS, 12 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | REM See the License for the specific language governing permissions and 14 | REM limitations under the License. 15 | REM 16 | REM --- Windows script 17 | REM --- (if Ant runs out of memory try defining ANT_OPTS=-Xmx512M) 18 | 19 | @IF not defined ANT_HOME ( 20 | @echo BUILD FAILED: You must set the env variable ANT_HOME to your Apache Ant folder 21 | goto end 22 | ) 23 | @IF not defined VSPHERE_SDK_HOME ( 24 | @echo BUILD FAILED: You must set the env variable VSPHERE_SDK_HOME to your vSphere Client SDK folder 25 | goto end 26 | ) 27 | @IF not exist "%VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar" ( 28 | @echo BUILD FAILED: VSPHERE_SDK_HOME is not set to a valid vSphere Client SDK folder 29 | @echo %VSPHERE_SDK_HOME%\libs\vsphere-client-lib.jar is missing 30 | goto end 31 | ) 32 | 33 | @call "%ANT_HOME%\bin\ant" -f build-java.xml 34 | 35 | :end 36 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/e2e/pages/homePage.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | 'use strict'; 15 | import { browser, by, element, ElementFinder } from 'protractor'; 16 | import { VicWebappPage } from '../app.po'; 17 | import { defaultTimeout } from './common'; 18 | import { VicVchMain } from './vicVchMain'; 19 | 20 | export class HomePage extends VicWebappPage { 21 | 22 | private iconVsphereHome = '.clr-vmw-logo'; 23 | private iconVicShortcut = '.com_vmware_vic-home-shortcut-icon'; 24 | 25 | navigateToHome() { 26 | browser.sleep(defaultTimeout); 27 | this.waitForElementToBePresent(this.iconVsphereHome); 28 | this.clickByCSS(this.iconVsphereHome); 29 | } 30 | 31 | navigateToVicPlugin() { 32 | this.waitForElementToBePresent(this.iconVicShortcut); 33 | this.clickByCSS(this.iconVicShortcut); 34 | return new VicVchMain(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tests/test-cases/Group13-vMotion/13-02-vMotion-Container.md: -------------------------------------------------------------------------------- 1 | Test 13-02 vMotion Container 2 | ======= 3 | 4 | # Purpose: 5 | To verify the VCH appliance created using wizard UI continues to function properly after some or all of it's related containers are vMotioned 6 | 7 | # References: 8 | [1- vMotion A Powered On Virtual Machine](http://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.dcadmin.doc_41/vsp_dc_admin_guide/migrating_virtual_machines/t_migrate_a_powered-on_virtual_machine_with_vmotion.html) 9 | 10 | # Environment: 11 | This test requires that a vCenter server is running and available 12 | 13 | # Test Steps: 14 | 1. Install a new VCH appliance using wizard UI onto one of the hosts within the vCenter server 15 | 2. Create several containers on the new VCH appliance that are in the following states: created but not started, started and running, started and stopped, stopped after running and being attached to, running after being attached to but currently not attached to, running and currently attached to 16 | 3. vMotion each of the containers to a new host within the vCenter server 17 | 4. Complete the life cycle of the containers created in Step 2, including getting docker logs and re-attaching to containers that are running 18 | 19 | # Expected Outcome: 20 | In each scenario, the VCH appliance should continue to work as expected after being vMotioned and all docker commands should return without error 21 | 22 | # Possible Problems: 23 | None 24 | -------------------------------------------------------------------------------- /tests/test-cases/Group18-VIC-UI/18-2-VIC-UI-Uninstaller.md: -------------------------------------------------------------------------------- 1 | Test 18-2 - VIC UI Uninstallation 2 | ====== 3 | 4 | #Purpose: 5 | To test all possible uninstallation failures and success scenarios on VCSA 6 | 7 | #References: 8 | 9 | #Environment: 10 | * Testing VIC UI requires a working VCSA setup with VCH installed 11 | 12 | #Test Steps: 13 | 1. Script should fail when run without `configs` file 14 | 2. Script should fail when run `plugin-manifest` file 15 | 3. When run, the script should ask for VC IP first 16 | 4. When run with VC IP provided as an argument, the script should ask for VC admin username 17 | 5. When run with VC IP and admin username as arguments, the script should ask for VC admin password 18 | 6. When run with all VC connection information, the script should prompt the user to verify the VC thumbprint 19 | 7. When an environment variable `VIC_MACHINE_THUMBPRINT` is set, the script should still be able to fetch the VC thumbprint 20 | 8. Script should fail when the user attempts to install the plugin against a non vCenter host 21 | 9. Script should fail when the user attempts to pass wrong vCenter admin credentials 22 | 10. [Unix-like OS only] Script should fail when the user provides a wrong VC thumbprint 23 | 11. [Unix-like OS only] Script should successfully uninstall the plugins 24 | 12. Script should fail when trying to uninstall the plugins already gone 25 | 26 | #Expected Outcome: 27 | * Each step should return success 28 | 29 | #Possible Problems: 30 | None 31 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/utils/ssl/ThumbprintHostNameVerifier.java: -------------------------------------------------------------------------------- 1 | /* Copyright 2016 VMware, Inc. All rights reserved. -- VMware Confidential */ 2 | package com.vmware.utils.ssl; 3 | 4 | import javax.net.ssl.HostnameVerifier; 5 | import javax.net.ssl.SSLException; 6 | import javax.net.ssl.SSLSession; 7 | import java.security.cert.Certificate; 8 | import java.security.cert.CertificateException; 9 | import java.security.cert.X509Certificate; 10 | 11 | public class ThumbprintHostNameVerifier implements HostnameVerifier { 12 | 13 | @Override 14 | public boolean verify(String host, SSLSession session) { 15 | try { 16 | Certificate[] certificates = session.getPeerCertificates(); 17 | verify(host, (X509Certificate) certificates[0]); 18 | return true; 19 | } catch (SSLException e) { 20 | return false; 21 | } 22 | } 23 | 24 | private void verify(String host, X509Certificate cert) throws SSLException { 25 | try { 26 | String thumbprint = ThumbprintTrustManager.getThumbprint(cert); 27 | boolean hasThumbprint = ThumbprintTrustManager.checkThumbprint(thumbprint); 28 | if (!hasThumbprint) { 29 | throw new SSLException("Server certificate chain is not trusted and thumbprint doesn't match"); 30 | } 31 | } catch (CertificateException e) { 32 | throw new SSLException(e.getMessage()); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/services/mocks/vmStub.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const getVmStubData: Function = (type: string): any => { 18 | if (type === 'vch') { 19 | return { 20 | id: '1', 21 | name: 'fake vch vm', 22 | isVCH: true, 23 | isContainer: false, 24 | dockerEndpoint: '1.2.3.4:2376', 25 | dockerLog: 'https://1.2.3.4:2378', 26 | powerState: 'poweredOff' 27 | }; 28 | } else { 29 | return { 30 | id: '2', 31 | name: 'fake container vm', 32 | container_name: 'container name', 33 | isVCH: false, 34 | isContainer: true, 35 | image_name: 'nginx', 36 | portmapping: '8081:80/tcp', 37 | powerState: 'poweredOn' 38 | }; 39 | } 40 | }; 41 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/testing/router-stubs.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { NavigationExtras } from '@angular/router'; 18 | 19 | import { BehaviorSubject } from 'rxjs'; 20 | 21 | export interface TestEventTarget extends EventTarget { 22 | files: any[] 23 | } 24 | 25 | export class ActivatedRouteStub { 26 | 27 | // ActivatedRoute.params is Observable 28 | private subject = new BehaviorSubject(this.testParams); 29 | params = this.subject.asObservable(); 30 | 31 | // Test parameters 32 | private _testParams: {}; 33 | get testParams() { 34 | return this._testParams; 35 | } 36 | set testParams(params: {}) { 37 | this._testParams = params; 38 | this.subject.next(params); 39 | } 40 | } 41 | 42 | export class RouterStub { 43 | navigate(commands: any[], extras?: NavigationExtras) { } 44 | } 45 | -------------------------------------------------------------------------------- /tests/test-cases/Group18-VIC-UI/18-1-VIC-UI-Installer.md: -------------------------------------------------------------------------------- 1 | Test 18-1 - VIC UI Installation 2 | ====== 3 | 4 | #Purpose: 5 | To test all possible installation failures and success scenarios on VCSA 6 | 7 | #References: 8 | 9 | #Environment: 10 | * Testing VIC UI requires a working VCSA setup with VCH installed 11 | 12 | #Test Steps: 13 | 1. Script should fail when run without `configs` file 14 | 2. Script should fail when run `plugin-manifest` file 15 | 3. When run, the script should ask for VC IP first 16 | 4. When run with VC IP provided as an argument, the script should ask for VC admin username 17 | 5. When run with VC IP and admin username as arguments, the script should ask for VC admin password 18 | 6. When run with all VC connection information, the script should prompt the user to verify the VC thumbprint 19 | 7. When an environment variable `VIC_MACHINE_THUMBPRINT` is set, the script should still be able to fetch the VC thumbprint 20 | 8. Script should fail when the user attempts to install the plugin against a non vCenter host 21 | 9. Script should fail when the user attempts to pass wrong vCenter admin credentials 22 | 10. [Unix-like OS only] Script should fail when the user provides a wrong VC thumbprint 23 | 11. [Unix-like OS only] Script should fail when the URL to the plugin bundles on VIC appliance is incorrect 24 | 12. Script should successfully install the plugins 25 | 26 | #Expected Outcome: 27 | * Each step should return success 28 | 29 | #Possible Problems: 30 | None 31 | -------------------------------------------------------------------------------- /.drone.local.script.yml: -------------------------------------------------------------------------------- 1 | workspace: 2 | base: /go 3 | path: src/github.com/vmware/vic 4 | 5 | pipeline: 6 | clone: 7 | image: plugins/git 8 | tags: true 9 | recursive: false 10 | vic-uia: 11 | image: ${TEST_BUILD_IMAGE=gcr.io/eminent-nation-87317/vic-integration-test:1.33} 12 | pull: true 13 | environment: 14 | BIN: bin 15 | GOPATH: /go 16 | SHELL: /bin/bash 17 | TEST_DATASTORE: ${TEST_DATASTORE} 18 | TEST_RESOURCE: ${TEST_RESOURCE} 19 | GOVC_INSECURE: true 20 | BUILD_NUMBER: #BUILD_NUMBER 21 | TEST_VSPHERE_VER: #TEST_VSPHERE_VER 22 | TEST_VCSA_BUILD: #TEST_VCSA_BUILD 23 | TEST_OS: #TEST_OS 24 | UI_TEST_CASES_FOLDER: tests/test-cases/Group18-VIC-UI 25 | TEST_RESULTS_FOLDER: #TEST_RESULTS_FOLDER 26 | ROBOT_SCRIPT: #ROBOT_SCRIPT 27 | commands: 28 | - set -e 29 | - pip install pexpect 30 | - cd $UI_TEST_CASES_FOLDER 31 | - if [ $TEST_OS = "Mac" ] ; then robot --log container_log.html --report container_report.html --output container_output.xml --test *Mac -C ansi -d ../../../$TEST_RESULTS_FOLDER $ROBOT_SCRIPT ; fi 32 | - if [ $TEST_OS = "Ubuntu" ] ; then robot --include anyos --include unixlike --test TestCase-* -C ansi -d ../../../$TEST_RESULTS_FOLDER $ROBOT_SCRIPT ; fi 33 | - if [ $TEST_OS = "Windows" ] ; then robot --log container_log.html --report container_report.html --output container_output.xml --test *Windows -C ansi -d ../../../$TEST_RESULTS_FOLDER $ROBOT_SCRIPT ; fi 34 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/utils/ConfigLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.utils; 19 | 20 | import java.io.FileNotFoundException; 21 | import java.io.IOException; 22 | import java.io.InputStream; 23 | import java.util.Properties; 24 | 25 | public class ConfigLoader { 26 | private final Properties prop; 27 | 28 | public ConfigLoader(String configFile) throws IOException { 29 | InputStream is = null; 30 | try { 31 | prop = new Properties(); 32 | is = getClass().getClassLoader().getResourceAsStream(configFile); 33 | if (is != null) { 34 | prop.load(is); 35 | } else { 36 | throw new FileNotFoundException("'" + configFile + "' was not found"); 37 | } 38 | } finally { 39 | if(is != null) { 40 | is.close(); 41 | } 42 | } 43 | } 44 | 45 | public String getProp(String key) { 46 | return prop.getProperty(key); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /h5c/vic/build-plugin-package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Creates the plugin package folder from vic and vic-service: 4 | vic 5 | plugin-package.xml 6 | /plugins 7 | gson-2.3.1.jar 8 | vic.war 9 | vic-service.jar 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tests/pass-rate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2018 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | curl -s -H "Authorization: token $GITHUB_AUTOMATION_API_KEY" https://api.github.com/repos/vmware/vic-ui/commits | jq -r ".[].sha" | xargs -n1 -I{} curl -s -H "Authorization: token $GITHUB_AUTOMATION_API_KEY" https://api.github.com/repos/vmware/vic-ui/statuses/{} | jq -r ".[-0].state" > status.out 17 | 18 | failures=$(cat status.out | grep -c failure) 19 | echo "Number of failed merges to master in the last 30 merges: $failures" 20 | successes=$(cat status.out | grep -c success) 21 | echo "Number of successful merges to master in the last 30 merges: $successes" 22 | 23 | let total=$successes+$failures 24 | passrate=$(bc -l <<< "scale=2;100 * ($successes / $total)") 25 | 26 | echo "Current vmware/vic-ui CI passrate: $passrate" 27 | curl --max-time 10 --retry 3 -s -d "payload={'channel': '#vic-bots', 'text': 'Current vmware/vic-ui CI passrate: $passrate%'}" "$SLACK_URL" 28 | -------------------------------------------------------------------------------- /tests/save-test-results.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Saves test results to reporting server 17 | 18 | echo "rpcbind : $REPORTING_SERVER_URL" >> /etc/hosts.allow 19 | mkdir -p /run/sendsigs.omit.d 20 | service rpcbind restart 21 | mkdir /drone-test-results 22 | mount $REPORTING_SERVER_URL:/export/drone-test-results /drone-test-results 23 | 24 | testresultsdb="vic-all.db" 25 | 26 | if [ $DRONE_BRANCH = "master" ] && [ $DRONE_REPO = "vmware/vic" ]; then 27 | testresultsdb="vic-master.db" 28 | fi 29 | 30 | # save test result to db 31 | testresultspath="/drone-test-results/testruns-db/$testresultsdb" 32 | echo "Saving integration test results to $testresultspath" 33 | python -m dbbot.run -k -b $testresultspath output.xml 34 | 35 | # copy test run files to build folder 36 | mkdir -p /drone-test-results/testruns/$DRONE_BUILD_NUMBER 37 | cp log.html report.html /drone-test-results/testruns/$DRONE_BUILD_NUMBER/ 38 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/create-vch-wizard.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { environment } from '../../../environments/environment'; 17 | 18 | export const VIC_ROOT_OBJECT_ID_WITH_NAME = 'urn:vic:vic:Root:vic%25252Fvic-root?properties=name'; 19 | export const CREATE_VCH_WIZARD_URL = 20 | `/ui/vic/resources/dist/index.html?view=create-vch`; 21 | export const WIZARD_MODAL_WIDTH = 1050; 22 | export const WIZARD_MODAL_HEIGHT = 700; 23 | export const CHECK_RP_UNIQUENESS_URL = '/ui/vic/rest/services/check-rp-uniqueness'; 24 | export const GET_CLONE_TICKET_URL = '/ui/vic/rest/services/acquire-clone-ticket'; 25 | export const CPU_MIN_LIMIT_MHZ = 1; 26 | export const MEMORY_MIN_LIMIT_MB = 1; 27 | export const VIC_APPLIANCE_PORT = 8443; 28 | export const VIC_APPLIANCES_LOOKUP_URL = '/ui/vic/rest/services/get-vic-appliances'; 29 | 30 | /** 31 | * Events 32 | */ 33 | export const DATAGRID_REFRESH_EVENT = 'datagridRefresh'; 34 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/filesize.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Internal imports 18 | import { byteToLegibleUnit } from './filesize'; 19 | 20 | // Tests 21 | describe('Filesize', () => { 22 | it('should return bytes to legible units', () => { 23 | const BYTES = 100; 24 | const KILOBYTE = 1024; 25 | const MEGABYTE = Math.pow(KILOBYTE, 2); 26 | const GIGABYTE = Math.pow(KILOBYTE, 3); 27 | const TERABYTE = Math.pow(KILOBYTE, 4); 28 | 29 | let result = byteToLegibleUnit(BYTES); 30 | expect(result).toContain('B'); 31 | 32 | result = byteToLegibleUnit(KILOBYTE); 33 | expect(result).toContain('KB'); 34 | 35 | result = byteToLegibleUnit(MEGABYTE); 36 | expect(result).toContain('MB'); 37 | 38 | result = byteToLegibleUnit(GIGABYTE); 39 | expect(result).toContain('GB'); 40 | 41 | result = byteToLegibleUnit(TERABYTE); 42 | expect(result).toContain('TB'); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/VmQueryResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model; 19 | 20 | import java.util.Map; 21 | import com.vmware.vise.vim.data.VimObjectReferenceService; 22 | 23 | public class VmQueryResult extends ModelObject { 24 | private final Map _vmsMap; 25 | private int _match = 0; 26 | 27 | public VmQueryResult( 28 | Map vmsMap, 29 | VimObjectReferenceService vimObjectReferenceService) { 30 | _vmsMap = vmsMap; 31 | _match = vmsMap.size(); 32 | if (_vmsMap == null || 33 | vimObjectReferenceService == null) { 34 | throw new IllegalArgumentException("constructor argument cannot be empty!"); 35 | } 36 | } 37 | 38 | @Override 39 | public Object getProperty(String property) { 40 | if ("match".equals(property)) { 41 | return _match; 42 | } else if ("results".equals(property)) { 43 | return _vmsMap; 44 | } 45 | return null; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/VerifyVendorStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.support.ui.ExpectedConditions; 5 | import org.openqa.selenium.support.ui.WebDriverWait; 6 | 7 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 8 | 9 | public class VerifyVendorStep extends UiTestStep { 10 | private static final long serialVersionUID = 1L; 11 | private static final String IFRAME_SELECTOR = "//iframe[contains(@src,\"/ui/vic\")]"; 12 | private static final String CSS_VENDOR_SELECTOR = 13 | "ul.summary-items-list li#vendor span.summary-value"; 14 | 15 | @Override 16 | public String getDescription() { 17 | return String.format("%s", "Verifies if vendor is set properly"); 18 | } 19 | 20 | private void switchToIframe() { 21 | WebDriverWait wait = new WebDriverWait(getDriver(), 30); 22 | By iframe = By.xpath(IFRAME_SELECTOR); 23 | wait.until(ExpectedConditions.visibilityOfElementLocated(iframe)); 24 | getDriver().switchTo().frame(getDriver().findElement(iframe)); 25 | } 26 | 27 | private void switchToParentFrame() { 28 | getDriver().switchTo().parentFrame(); 29 | } 30 | 31 | @Override 32 | public void execute() throws Throwable { 33 | switchToIframe(); 34 | verify.safely( 35 | getDriver().findElement(By.cssSelector(CSS_VENDOR_SELECTOR)) 36 | .getText(), 37 | "VMware", 38 | String.format("%s", "Vendor should be 'VMware'")); 39 | switchToParentFrame(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright 2017 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | show_error () { 18 | echo "Provide the path to the H5 Client SDK. e.g. $0 -s /path/to/sdk" >&2 19 | exit 1 20 | } 21 | 22 | while getopts :s:b: flag ; do 23 | case $flag in 24 | s) 25 | VSPHERE_H5C_SDK_HOME=$OPTARG 26 | ;; 27 | b) 28 | BUILD_MODE=$OPTARG 29 | ;; 30 | \?) 31 | show_error 32 | ;; 33 | *) 34 | show_error 35 | ;; 36 | esac 37 | done 38 | 39 | if [[ -z "$VSPHERE_H5C_SDK_HOME" ]] ; then 40 | show_error 41 | fi 42 | 43 | npm ci 44 | 45 | if [[ "$BUILD_MODE" = "prod" ]] ; then 46 | echo "Building in production mode" 47 | rm -rf ../main/webapp/resources/dist 2>/dev/null 48 | npm run build:prod 49 | else 50 | echo "Building in development mode" 51 | rm -rf ../main/webapp/resources/dist 2>/dev/null 52 | npm run build:dev 53 | fi 54 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/refresh.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { Injectable } from '@angular/core'; 18 | import { Subject } from 'rxjs'; 19 | 20 | import { AppAlertService } from './app-alert.service'; 21 | 22 | /** 23 | * Service used to send a 'refresh event' to any observer view 24 | */ 25 | @Injectable() 26 | export class RefreshService { 27 | // Use an rxjs Subject to multicast to multiple observers. 28 | // See http://reactivex.io/rxjs/manual/overview.html#subject 29 | private refreshSource = new Subject(); 30 | public refreshObservable$ = this.refreshSource.asObservable(); 31 | 32 | constructor(private appAlertService: AppAlertService) { 33 | } 34 | 35 | public refreshView(): void { 36 | // Close any open alert box here before a view is refreshed 37 | this.appAlertService.closeAlert(); 38 | 39 | // Propagate refresh event to subscribers 40 | this.refreshSource.next(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/vic-i18n.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { Injectable } from '@angular/core'; 18 | import { I18nService } from '../shared/i18n.service'; 19 | @Injectable() 20 | export class Vic18nService { 21 | constructor( 22 | private i18n: I18nService 23 | ) { } 24 | 25 | /** 26 | * Returns localized text for a given key 27 | * @param key : key defined in com_vmware_vic.properties 28 | * @returns localized text 29 | */ 30 | translate(ns: any, alias: string) { 31 | const key = ns['keys'][alias]; 32 | const results = this.i18n.translate(key); 33 | if (results === key) { 34 | // when unit testing or run in a standalone mode, 35 | // key is returned as-is. for this case, look for its default 36 | // value defined in constants/resources.path.ts 37 | return ns['defaults'][key] || ''; 38 | } 39 | return results; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/protractor.conf.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Protractor configuration file, see link for more information 18 | // https://github.com/angular/protractor/blob/master/lib/config.ts 19 | 20 | const { 21 | SpecReporter 22 | } = require('jasmine-spec-reporter'); 23 | 24 | exports.config = { 25 | allScriptsTimeout: 11000, 26 | specs: [ 27 | './e2e/**/*.e2e-spec.ts' 28 | ], 29 | capabilities: { 30 | 'browserName': 'chrome', 31 | 'acceptInsecureCerts': true 32 | }, 33 | directConnect: true, 34 | baseUrl: 'http://localhost:9443/', 35 | framework: 'jasmine', 36 | jasmineNodeOpts: { 37 | showColors: true, 38 | defaultTimeoutInterval: 30000, 39 | print: function () {} 40 | }, 41 | onPrepare() { 42 | require('ts-node').register({ 43 | project: 'e2e/tsconfig.e2e.json' 44 | }); 45 | jasmine.getEnv().addReporter(new SpecReporter({ 46 | spec: { 47 | displayStacktrace: true 48 | } 49 | })); 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/constants/nodetype.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | export const DC_CLUSTER = 'DcCluster'; 18 | export const DC_STANDALONE_HOST = 'DcStandaloneHost'; 19 | 20 | export const COMPUTE_RESOURCE_NODE_TYPES = { 21 | dc: { 22 | dc: 'Datacenter' 23 | }, 24 | folder: { 25 | dc_folder: 'DcCompResFolder', 26 | comp_res_folder: 'CompResFolderCompResFolder' 27 | }, 28 | host: { 29 | dc_stand_alone: 'DcStandaloneHost', 30 | cluster_host: 'ClusterHostSystem', 31 | host_system: 'HostSystem', 32 | }, 33 | cluster: { 34 | dc_cluster: 'DcCluster', 35 | folder_cluster: 'CompResFolderCluster', 36 | cluster_compute_resource: 'ClusterComputeResource', 37 | }, 38 | resource_pool: { 39 | resource_pool: 'ResourcePool', 40 | host_resource_pool: 'StandaloneHostResPool', 41 | cluster_resource_pool: 'ClusterResPool', 42 | resource_pool_resource_pool: 'ResPoolResPool', 43 | vic_vch_resource_pool: 'VicVchResourcePool' 44 | } 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /tests/test-cases/Group18-VIC-UI/18-3-VIC-UI-Upgrader.md: -------------------------------------------------------------------------------- 1 | Test 18-3 - VIC UI Upgrade 2 | ====== 3 | 4 | #Purpose: 5 | To test all possible upgrade failures and success scenarios on VCSA 6 | 7 | #References: 8 | 9 | #Environment: 10 | * Testing VIC UI requires a working VCSA setup with VCH installed 11 | 12 | #Test Steps: 13 | 1. Script should fail when run without `configs` file 14 | 2. Script should fail when run `plugin-manifest` file 15 | 3. When run, the script should ask for VC IP first 16 | 4. When run with VC IP provided as an argument, the script should ask for VC admin username 17 | 5. When run with VC IP and admin username as arguments, the script should ask for VC admin password 18 | 6. When run with all VC connection information, the script should prompt the user to verify the VC thumbprint 19 | 7. When an environment variable `VIC_MACHINE_THUMBPRINT` is set, the script should still be able to fetch the VC thumbprint 20 | 8. Script should fail when the user attempts to install the plugin against a non vCenter host 21 | 9. Script should fail when the user attempts to pass wrong vCenter admin credentials 22 | 10. [Unix-like OS only] Script should fail when the user provides a wrong VC thumbprint 23 | 11. [Unix-like OS only] Script should fail when the URL to the plugin bundles on VIC appliance is incorrect 24 | 12. When the plugins are not yet installed, the script should warn the user if s/he wants to install them 25 | 13. When the plugins are already installed, the script should warn the user if s/he wants to upgrade them 26 | 27 | #Expected Outcome: 28 | * Each step should return success 29 | 30 | #Possible Problems: 31 | None 32 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/SampleActionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Mac OS script starting an Ant build of the current flex project 18 | Note: if Ant runs out of memory try defining ANT_OPTS=-Xmx512M 19 | 20 | */ 21 | 22 | package com.vmware.vic.services; 23 | 24 | /** 25 | * Service handling some actions invoked from the UI 26 | * 27 | * It must be declared as osgi:service with the same name in 28 | * main/resources/META-INF/spring/bundle-context-osgi.xml 29 | */ 30 | public interface SampleActionService { 31 | /** 32 | * Sample action called on the server. 33 | * 34 | * @param objRef Internal reference to the vCenter object for that action. 35 | */ 36 | public void sampleAction1(Object objRef); 37 | 38 | /** 39 | * Sample action called on the server. 40 | * 41 | * @param objRef Internal reference to the vCenter object for that action. 42 | * @return true is the action is successful, false otherwise. 43 | */ 44 | public boolean sampleAction2(Object objRef); 45 | } 46 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/services/http-interceptor.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, inject, async } from '@angular/core/testing'; 2 | import { MockBackend, MockConnection } from '@angular/http/testing'; 3 | import { Http, XHRBackend, BrowserXhr, RequestOptions, BaseRequestOptions, 4 | ResponseOptions, BaseResponseOptions, ConnectionBackend } from '@angular/http'; 5 | import { Globals, GlobalsService } from '../shared/index'; 6 | import { HttpInterceptorService } from './http-interceptor.service'; 7 | 8 | describe('HTTP interceptor Service', () => { 9 | 10 | let service: HttpInterceptorService; 11 | 12 | beforeEach(async(() => { TestBed.configureTestingModule({ 13 | providers: [ 14 | { provide: XHRBackend, useClass: MockBackend }, 15 | { provide: RequestOptions, useClass: BaseRequestOptions }, 16 | { provide: ResponseOptions, useClass: BaseResponseOptions }, 17 | HttpInterceptorService, 18 | Globals, 19 | GlobalsService, 20 | BrowserXhr] 21 | }).compileComponents(); 22 | service = TestBed.get(HttpInterceptorService); 23 | })); 24 | 25 | describe('HTTP interceptor', () => { 26 | it('should intercept http request', async(inject([XHRBackend], (mockBackend) => { 27 | mockBackend.connections.subscribe(connection => { 28 | connection.mockRespond(new ResponseOptions({status: 401})); 29 | }); 30 | service.request('/ui/usersession') 31 | .subscribe(response => { 32 | expect(response.status).toBe(401); 33 | }, (error: Error) => { 34 | console.error(error); 35 | }); 36 | }))); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/step/objectworkspace/VerifyVchNumberStep.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.step.objectworkspace; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.support.ui.ExpectedConditions; 5 | import org.openqa.selenium.support.ui.WebDriverWait; 6 | 7 | import com.vmware.vsphere.client.automation.step.ui.UiTestStep; 8 | 9 | public class VerifyVchNumberStep extends UiTestStep { 10 | private static final long serialVersionUID = 1L; 11 | private static final long ELEMENT_TIMEOUT = 30; 12 | private static final String IFRAME_SELECTOR = "//iframe[contains(@src,\"/ui/vic\")]"; 13 | private static final String CSS_VCH_LEN_SELECTOR = 14 | "ul.summary-items-list li#vch_len span.summary-value"; 15 | 16 | @Override 17 | public String getDescription() { 18 | return String.format("%s", "Verifies # of Virtual Container Hosts in the Summary page"); 19 | } 20 | 21 | private void switchToIframe() { 22 | WebDriverWait wait = new WebDriverWait(getDriver(), 30); 23 | By iframe = By.xpath(IFRAME_SELECTOR); 24 | wait.until(ExpectedConditions.visibilityOfElementLocated(iframe)); 25 | getDriver().switchTo().frame(getDriver().findElement(iframe)); 26 | } 27 | 28 | private void switchToParentFrame() { 29 | getDriver().switchTo().parentFrame(); 30 | } 31 | 32 | @Override 33 | public void execute() throws Throwable { 34 | switchToIframe(); 35 | verify.safely( 36 | getDriver().findElement(By.cssSelector(CSS_VCH_LEN_SELECTOR)) 37 | .getText(), 38 | "1", 39 | String.format("%s", "VCH length should be 1")); 40 | switchToParentFrame(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-view/vic-summary-view.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | div.summary-container { 18 | padding-top: 10px; 19 | font-size: 13px; 20 | img.vic-summary-view-logo { 21 | height:100px; 22 | padding-right: 2em; 23 | vertical-align: top; 24 | } 25 | } 26 | 27 | ul.summary-items-list { 28 | display: inline-block; 29 | li { 30 | display: table-row-group; 31 | span.summary-label { 32 | display: table-cell; 33 | min-width: 145px; 34 | } 35 | span.summary-value { 36 | display: table-cell; 37 | width: auto; 38 | padding-left: 10px; 39 | } 40 | } 41 | } 42 | 43 | p.summary-intro { 44 | max-width: 600px; 45 | font-size: small; 46 | line-height: normal; 47 | } 48 | 49 | .mb-2 { 50 | margin-bottom: 2rem !important; 51 | } 52 | 53 | .summary-wrapper { 54 | display: flex; 55 | 56 | .summary-content { 57 | margin-right: 80px; 58 | min-width:340px; 59 | } 60 | 61 | .summary-title { 62 | font-weight: bold; 63 | margin-bottom: 10px; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/utils/filesize.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | const KILOBYTE = 1024; 18 | const MEGABYTE = Math.pow(KILOBYTE, 2); 19 | const GIGABYTE = Math.pow(KILOBYTE, 3); 20 | const TERABYTE = Math.pow(KILOBYTE, 4); 21 | const B_AFFIX = 'B'; 22 | const KB_AFFIX = 'KB'; 23 | const MB_AFFIX = 'MB'; 24 | const GB_AFFIX = 'GB'; 25 | const TB_AFFIX = 'TB'; 26 | const DECIMALS = 2; 27 | 28 | function byteToLegibleUnit(num: number): string { 29 | const results = num * 1; 30 | if (results >= TERABYTE) { 31 | return `${(results / TERABYTE).toFixed(DECIMALS)} ${TB_AFFIX}`; 32 | } else if (results >= GIGABYTE) { 33 | return `${(results / GIGABYTE).toFixed(DECIMALS)} ${GB_AFFIX}`; 34 | } else if (results >= MEGABYTE) { 35 | return `${(results / MEGABYTE).toFixed(DECIMALS)} ${MB_AFFIX}`; 36 | } else if (results >= KILOBYTE) { 37 | return `${(results / KILOBYTE).toFixed(DECIMALS)} ${KB_AFFIX}`; 38 | } else { 39 | return `${results} ${B_AFFIX}`; 40 | } 41 | } 42 | 43 | export { byteToLegibleUnit } 44 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/VicApplianceServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.services; 19 | 20 | import com.vmware.vic.PropFetcher; 21 | import com.vmware.vim25.InvalidPropertyFaultMsg; 22 | import com.vmware.vim25.RuntimeFaultFaultMsg; 23 | 24 | public class VicApplianceServiceImpl implements VicApplianceService { 25 | private final PropFetcher _propFetcher; 26 | 27 | public VicApplianceServiceImpl ( 28 | PropFetcher propFetcher) { 29 | if (propFetcher == null) { 30 | throw new IllegalArgumentException("constructor argument cannot be null"); 31 | } 32 | _propFetcher = propFetcher; 33 | } 34 | 35 | @Override 36 | public String[] getVicAppliancesList() { 37 | String[] results = null; 38 | try { 39 | results = _propFetcher.getVicApplianceVms().toArray(new String[]{}); 40 | } catch (RuntimeFaultFaultMsg | InvalidPropertyFaultMsg e) { 41 | e.printStackTrace(); 42 | } 43 | return results; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /tests/test-cases/Group13-vMotion/13-01-vMotion-VCH-Appliance.md: -------------------------------------------------------------------------------- 1 | Test 13-01 vMotion VCH Appliance 2 | ======= 3 | 4 | # Purpose: 5 | To verify the VCH appliance created using wizard UI continues to function properly after being vMotioned to a new host 6 | 7 | # References: 8 | [1- vMotion A Powered On Virtual Machine](http://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.dcadmin.doc_41/vsp_dc_admin_guide/migrating_virtual_machines/t_migrate_a_powered-on_virtual_machine_with_vmotion.html) 9 | 10 | # Environment: 11 | This test requires that a vCenter server is running and available 12 | 13 | # Test Steps: 14 | 1. Install a new VCH appliance using wizard UI onto one of the hosts within the vCenter server 15 | 2. While the VCH appliance is powered on, vMotion the VCH appliance to a new host 16 | 3. Run a variety of docker commands on the VCH appliance after it has moved 17 | 4. Delete the VCH appliance 18 | 5. Install a new VCH appliance using wizard UI onto on the hosts within the vCenter server 19 | 6. Create several containers on the new VCH appliance that are in the following states: created but not started, started and running, started and stopped, stopped after running and being attached to, running after being attached to but currently not attached to, running and currently attached to 20 | 7. vMotion the VCH appliance to a new host 21 | 8. Complete the life cycle of the containers created in Step 11, including getting docker logs and re-attaching to containers that are running 22 | 23 | # Expected Outcome: 24 | In each scenario, the VCH appliance should continue to work as expected after being vMotioned and all docker commands should return without error 25 | 26 | # Possible Problems: 27 | None -------------------------------------------------------------------------------- /tests/resources/Util.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Library OperatingSystem 17 | Library String 18 | Library Collections 19 | Library requests 20 | Library Process 21 | Library SSHLibrary 5 minute 22 | Library DateTime 23 | Library Selenium2Library 30 30 24 | Resource Nimbus-Util.robot 25 | Resource Vsphere-Util.robot 26 | Resource Vsphere-VCH-Plugin.robot 27 | Resource VCH-Creation-Wizard-UI-Util.robot 28 | Resource Vsphere-UI-Util.robot 29 | Resource VCH-Util.robot 30 | Resource Drone-Util.robot 31 | Resource Github-Util.robot 32 | Resource Harbor-Util.robot 33 | Resource Docker-Util.robot 34 | Resource Admiral-Util.robot 35 | Resource OVA-Util.robot 36 | Resource Cert-Util.robot 37 | Resource Slack-Util.robot 38 | 39 | Variables dynamic-vars.py 40 | 41 | *** Variables *** 42 | @{BROWSERS} chrome #firefox ie 43 | ${BASE_URL} https://127.0.0.1 44 | 45 | *** Keywords *** 46 | Wait Until Element Is Visible And Enabled 47 | [Arguments] ${element} 48 | Wait Until Element Is Visible ${element} 49 | Wait Until Element Is Enabled ${element} 50 | -------------------------------------------------------------------------------- /tests/resources/Github-Util.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2016-2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Documentation This resource provides keywords to interact with Github 17 | 18 | *** Keywords *** 19 | Get State Of Github Issue 20 | [Arguments] ${num} 21 | [Tags] secret 22 | :FOR ${idx} IN RANGE 0 5 23 | \ ${status} ${result}= Run Keyword And Ignore Error Get https://api.github.com/repos/vmware/vic/issues/${num}?access_token\=%{GITHUB_AUTOMATION_API_KEY} 24 | \ Exit For Loop If '${status}' 25 | \ Sleep 1 26 | Should Be Equal ${result.status_code} ${200} 27 | ${status}= Get From Dictionary ${result.json()} state 28 | [Return] ${status} 29 | 30 | Post Comment To Github Issue 31 | [Arguments] ${num} ${comment} 32 | [Tags] secret 33 | :FOR ${idx} IN RANGE 0 5 34 | \ ${status} ${result}= Run Keyword And Ignore Error Post https://api.github.com/repos/vmware/vic/issues/${num}/comments?access_token\=%{GITHUB_AUTOMATION_API_KEY} data={"body": "${comment}"} 35 | \ Exit For Loop If '${status}' 36 | \ Sleep 1 37 | Should Be Equal ${result.status_code} ${201} -------------------------------------------------------------------------------- /h5c/vic-service/src/test/java/com/vmware/vic/test/ConfigLoaderTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.test; 19 | 20 | import static org.junit.Assert.*; 21 | 22 | import java.io.FileNotFoundException; 23 | import java.io.IOException; 24 | 25 | import org.junit.Test; 26 | 27 | import com.vmware.vic.utils.ConfigLoader; 28 | 29 | @SuppressWarnings("unused") 30 | public class ConfigLoaderTest { 31 | @Test 32 | public void testConfigLoaderLoads() { 33 | try { 34 | ConfigLoader configLoader = new ConfigLoader("configs.properties"); 35 | assertNotNull(configLoader); 36 | } catch (IOException ex) { 37 | ex.printStackTrace(); 38 | } 39 | } 40 | 41 | @Test 42 | public void testWrongConfigsFile() { 43 | try { 44 | ConfigLoader configLoader = new ConfigLoader("meh"); 45 | } catch (FileNotFoundException ex) { 46 | assertNotNull(ex.getMessage()); 47 | } catch (IOException e) { 48 | assertNotNull(e); 49 | } 50 | } 51 | 52 | @Test 53 | public void testGetPropertyUiVersion() throws Exception { 54 | ConfigLoader configLoader = new ConfigLoader("configs.properties"); 55 | assertTrue(configLoader.getProp("uiVersion").length() > 0); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/constants/BaseVm.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model.constants; 19 | 20 | public class BaseVm { 21 | public static final String ID = "id"; 22 | public static final String VM_NAME = "name"; 23 | public static final String VM_OVERALL_STATUS = "overallStatus"; 24 | public static class Runtime { 25 | public static final String VM_POWERSTATE_FULLPATH = "runtime.powerState"; 26 | public static final String VM_POWERSTATE_BASENAME = "powerState"; 27 | } 28 | public static final String VM_SUMMARY = "summary"; 29 | public static class Config { 30 | public static final String VM_GUESTFULLNAME = "config.guestFullName"; 31 | public static final String VM_EXTRACONFIG = "config.extraConfig"; 32 | } 33 | public static final String VM_RESOURCECONFIG = "resourceConfig"; 34 | public static final String VM_RESOURCEPOOL = "resourcePool"; 35 | public static final String VM_OVERALLCPUUSAGE = "overallCpuUsage"; 36 | public static final String VM_GUESTMEMORYUSAGE = "guestMemoryUsage"; 37 | public static final String VM_COMMITTEDSTORAGE = "committedStorage"; 38 | } 39 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-view/summary-view.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { RouterModule, Routes } from '@angular/router'; 17 | 18 | import { ClarityModule } from '@clr/angular'; 19 | import { CommonModule } from '@angular/common'; 20 | import { CreateVchWizardService } from '../create-vch-wizard/create-vch-wizard.service'; 21 | import { DataPropertyService } from '../services/data-property.service'; 22 | import { NgModule } from '@angular/core'; 23 | import { SharedModule } from '../shared/shared.module'; 24 | import { VicSummaryViewComponent } from './summary-view.component'; 25 | 26 | const routes: Routes = [ 27 | { path: '', component: VicSummaryViewComponent }, 28 | { path: ':id', component: VicSummaryViewComponent } 29 | ]; 30 | 31 | @NgModule({ 32 | imports: [ 33 | CommonModule, 34 | ClarityModule, 35 | RouterModule.forChild(routes), 36 | SharedModule 37 | ], 38 | declarations: [ 39 | VicSummaryViewComponent 40 | ], 41 | providers: [ 42 | DataPropertyService, 43 | CreateVchWizardService 44 | ], 45 | exports: [VicSummaryViewComponent] 46 | }) 47 | export class VicSummaryViewModule { } 48 | -------------------------------------------------------------------------------- /h5c/vic/src/main/webapp/assets/css/plugin-icons.css: -------------------------------------------------------------------------------- 1 | /* 2 | * EXTERNAL ICONS SUPPORT: plugin-icons.css contain "external" icons, i.e. the ones 3 | * displayed outside plugin's views, in the main app menus, shortcuts or object lists. 4 | * Do not include other CSS rules here! 5 | * 6 | * Css name format must be ".bundleName-iconKey", where bundleName is the 7 | * defaultBundle and iconKey the resource key used in plugin.xml: 8 | * 9 | * 10 | * ... 11 | * #{iconKey} 12 | * 13 | * The same iconKey is defined in the .properties file used to compile Flex resources: 14 | * iconKey = Embed("../../webapp/assets/images/someIcon.png") 15 | * 16 | * Follow the SDK doc or other samples for the correct attributes based on the type of icon. 17 | */ 18 | .com_vmware_vic-addIcon { 19 | background: url("../images/addIcon.png"); 20 | width: 16px; 21 | height: 16px; 22 | display: inline-block; 23 | vertical-align: text-bottom; 24 | margin: 1px 4px 0; 25 | } 26 | .com_vmware_vic-editIcon { 27 | background: url("../images/editIcon.png"); 28 | width: 16px; 29 | height: 16px; 30 | display: inline-block; 31 | vertical-align: text-bottom; 32 | margin: 1px 4px 0; 33 | } 34 | 35 | .com_vmware_vic-home-shortcut-icon { 36 | background: url("../vic-icons/32x32.png"); 37 | width: 32px; 38 | height: 32px; 39 | display: inline-block; 40 | vertical-align: top; 41 | } 42 | 43 | .com_vmware_vic-viinventory-vic-icon, 44 | .com_vmware_vic-vic-root-icon { 45 | background: url("../vic-icons/16x16.png"); 46 | width: 16px; 47 | height: 16px; 48 | display: inline-block; 49 | margin: 1px 4px 0; 50 | vertical-align: text-bottom; 51 | line-height: 16px; 52 | background-repeat: no-repeat; 53 | } -------------------------------------------------------------------------------- /tests/nightly/upload-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2016 VMware, Inc. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | echo "Upload logs" 18 | 19 | set -x 20 | gsutil version -l 21 | set +x 22 | 23 | outfile="functional_logs_"$1".zip" 24 | 25 | echo $Build 26 | echo $outfile 27 | 28 | /usr/bin/zip -9 -r $outfile 60 65 nightly_console.txt 29 | 30 | # GC credentials 31 | keyfile="/root/vic-ci-logs.key" 32 | botofile="/root/.boto" 33 | echo -en $GS_PRIVATE_KEY > $keyfile 34 | chmod 400 $keyfile 35 | echo "[Credentials]" >> $botofile 36 | echo "gs_service_key_file = $keyfile" >> $botofile 37 | echo "gs_service_client_id = $GS_CLIENT_EMAIL" >> $botofile 38 | echo "[GSUtil]" >> $botofile 39 | echo "content_language = en" >> $botofile 40 | echo "default_project_id = $GS_PROJECT_ID" >> $botofile 41 | 42 | if [ -f "$outfile" ]; then 43 | gsutil cp $outfile gs://vic-ci-logs 44 | echo "----------------------------------------------" 45 | echo "Upload test logs:" 46 | echo "https://console.cloud.google.com/m/cloudstorage/b/vic-ci-logs/o/$outfile?authuser=1" 47 | echo "----------------------------------------------" 48 | else 49 | echo "No log output file to upload" 50 | fi 51 | 52 | if [ -f "$keyfile" ]; then 53 | rm -f $keyfile 54 | fi 55 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/services/CloneTicketServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | package com.vmware.vic.services; 14 | import com.vmware.vic.PropFetcher; 15 | import com.vmware.vim25.RuntimeFaultFaultMsg; 16 | 17 | public class CloneTicketServiceImpl implements CloneTicketService { 18 | 19 | private final PropFetcher _propFetcher; 20 | 21 | public CloneTicketServiceImpl (PropFetcher propFetcher) { 22 | 23 | if (propFetcher == null) { 24 | throw new IllegalArgumentException("constructor argument cannot be null"); 25 | } 26 | 27 | _propFetcher = propFetcher; 28 | } 29 | 30 | /** 31 | * Obtain a clone ticket from vSphere 32 | * @throws Exception 33 | */ 34 | @Override 35 | public String acquireCloneTicket(String serviceGuid) throws Exception { 36 | 37 | String acquireCloneTicket = ""; 38 | 39 | try { 40 | acquireCloneTicket = _propFetcher.acquireCloneTicket(serviceGuid); 41 | } catch (SecurityException e) { 42 | e.printStackTrace(); 43 | } catch (RuntimeFaultFaultMsg e) { 44 | e.printStackTrace(); 45 | } 46 | 47 | return acquireCloneTicket; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /h5c/vic-service/src/main/java/com/vmware/vic/model/ModelObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright 2017 VMware, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | */ 18 | package com.vmware.vic.model; 19 | 20 | import java.net.URI; 21 | 22 | import com.vmware.vic.ModelObjectUriResolver; 23 | 24 | public abstract class ModelObject { 25 | public static final String NAMESPACE = "vic:"; 26 | public static final Object UNSUPPORTED_PROPERTY = new Object(); 27 | 28 | private String _id; 29 | private URI _uri; 30 | private String _type; 31 | 32 | /** 33 | * @return object id 34 | */ 35 | public String getId() { 36 | return _id; 37 | } 38 | 39 | /** 40 | * @param value 41 | */ 42 | protected void setId(String value) { 43 | _id = value; 44 | } 45 | 46 | /** 47 | * @return object type 48 | */ 49 | public String getType() { 50 | if (_type == null) { 51 | _type = NAMESPACE + this.getClass().getSimpleName(); 52 | } 53 | return _type; 54 | } 55 | 56 | /** 57 | * @param resolver 58 | * @return URI for this object 59 | */ 60 | public URI getUri(ModelObjectUriResolver resolver) { 61 | if (_uri == null) { 62 | _uri = resolver.createUri(getType(), _id); 63 | } 64 | return _uri; 65 | } 66 | 67 | public abstract Object getProperty(String property); 68 | } 69 | -------------------------------------------------------------------------------- /h5c/vic-uia/src/main/java/com/vmware/vsphere/client/automation/test/common/DoNothingExceptLoginTest.java: -------------------------------------------------------------------------------- 1 | package com.vmware.vsphere.client.automation.test.common; 2 | 3 | import com.vmware.automation.core.annotation.RequiresTestbed; 4 | import com.vmware.automation.core.testbed.Testbed; 5 | import com.vmware.automation.core.testbed.ITestbedRequester.TestbedAllocation; 6 | import com.vmware.automation.core.workflow.StepComposition; 7 | import com.vmware.automation.core.workflow.WorkflowStep; 8 | import com.vmware.vsphere.client.automation.component.navigation.HomeNavigator; 9 | import com.vmware.vsphere.client.automation.test.WebClientTest; 10 | import com.vmware.vsphere.client.automation.testbed.HostTestbed; 11 | import com.vmware.vsphere.client.automation.testbed.SingleNgcTestbed; 12 | import com.vmware.vsphere.client.automation.testbed.VicTestbed; 13 | 14 | /** 15 | * Do Nothing Except Login Test: 16 | * The purpose of this test is to ensure resources data such as 17 | * locale are loaded and referenced properly by the actual test cases 18 | * by simply logging into the H5 Client and then logging out 19 | */ 20 | public class DoNothingExceptLoginTest extends WebClientTest { 21 | @RequiresTestbed(clazz = SingleNgcTestbed.class, allocation = TestbedAllocation.SHARED) 22 | private Testbed _singleNgcTestbed; 23 | 24 | @RequiresTestbed(clazz = HostTestbed.class) 25 | private HostTestbed _hostTestbed; 26 | 27 | @RequiresTestbed(clazz = VicTestbed.class) 28 | private VicTestbed _vicTestbed; 29 | 30 | @Override 31 | public String getDescription() { 32 | return String.format("%s", "Navigates to the home navigator"); 33 | } 34 | 35 | @Override 36 | protected void addTestSteps(StepComposition steps) { 37 | steps.add(new HomeNavigator()); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/e2e/pages/loginPage.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | 'use strict'; 15 | import { browser, by, element, ElementFinder } from 'protractor'; 16 | import { VicWebappPage } from '../app.po'; 17 | import { HomePage } from './homePage'; 18 | import { 19 | username, 20 | password 21 | } from './common'; 22 | 23 | export class LoginPage extends VicWebappPage { 24 | 25 | private userInput = '#username'; 26 | private passwordInput = '#password'; 27 | private submitButton = '#submit'; 28 | 29 | navigateToLoginPage() { 30 | console.log('Navego hasta login page'); 31 | browser.waitForAngularEnabled(false); 32 | return browser.get('https://localhost:9443'); 33 | } 34 | waitLoginFinish() { 35 | this.waitUntilUrlContains('serverObjectViewsExtension'); 36 | } 37 | 38 | submitLogin() { 39 | browser.waitForAngularEnabled(false); 40 | this.waitForElementToBePresent(this.userInput); 41 | this.clickByCSS(this.userInput); 42 | this.sendKeys(this.userInput, username); 43 | this.waitForElementToBePresent(this.passwordInput); 44 | this.sendKeys(this.passwordInput, password); 45 | this.clickByCSS(this.submitButton); 46 | this.waitLoginFinish(); 47 | return new HomePage(); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/delete-vch-modal/delete-vch-modal.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 9 | 30 | 36 | 37 |
38 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/delete-vch-modal/delete-vch-modal.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import {NgModule} from '@angular/core'; 18 | import {RouterModule, Routes} from '@angular/router'; 19 | import {CommonModule} from '@angular/common'; 20 | import {FormsModule, ReactiveFormsModule} from '@angular/forms'; 21 | import {ClarityModule} from '@clr/angular'; 22 | import {DeleteVchModalComponent} from './delete-vch-modal.component'; 23 | import {VicVmViewService} from '../services/vm-view.service'; 24 | import {CreateVchWizardService} from '../create-vch-wizard/create-vch-wizard.service'; 25 | import {ExtendedUserSessionService} from '../services/extended-usersession.service'; 26 | 27 | const routes: Routes = [ 28 | {path: ':id', component: DeleteVchModalComponent} 29 | ]; 30 | 31 | @NgModule({ 32 | imports: [ 33 | CommonModule, 34 | FormsModule, 35 | ReactiveFormsModule, 36 | ClarityModule, 37 | RouterModule.forChild(routes) 38 | ], 39 | declarations: [ 40 | DeleteVchModalComponent 41 | ], 42 | providers: [ 43 | VicVmViewService, 44 | CreateVchWizardService, 45 | ExtendedUserSessionService 46 | ], 47 | exports: [ 48 | DeleteVchModalComponent 49 | ] 50 | }) 51 | export class DeleteVchModalModule { } 52 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/container-view/container-view.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; 17 | import { RouterModule, Routes } from '@angular/router'; 18 | 19 | import { ClarityModule } from '@clr/angular'; 20 | import { CommonModule } from '@angular/common'; 21 | import { CreateVchWizardService } from '../create-vch-wizard/create-vch-wizard.service'; 22 | import { SharedModule } from '../shared/shared.module'; 23 | import { VicContainerViewComponent } from './container-view.component'; 24 | import { VicVmViewService } from '../services/vm-view.service'; 25 | 26 | const routes: Routes = [ 27 | { path: '', component: VicContainerViewComponent }, 28 | { path: ':id', component: VicContainerViewComponent } 29 | ]; 30 | 31 | @NgModule({ 32 | schemas: [CUSTOM_ELEMENTS_SCHEMA], 33 | imports: [ 34 | CommonModule, 35 | ClarityModule, 36 | RouterModule.forChild(routes), 37 | SharedModule 38 | ], 39 | declarations: [ 40 | VicContainerViewComponent 41 | ], 42 | providers: [ 43 | VicVmViewService, 44 | CreateVchWizardService 45 | ], 46 | exports: [VicContainerViewComponent] 47 | }) 48 | export class VicContainerViewModule { } 49 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/test.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 18 | 19 | import 'zone.js/dist/long-stack-trace-zone'; 20 | import 'zone.js/dist/proxy.js'; 21 | import 'zone.js/dist/sync-test'; 22 | import 'zone.js/dist/jasmine-patch'; 23 | import 'zone.js/dist/async-test'; 24 | import 'zone.js/dist/fake-async-test'; 25 | import { getTestBed } from '@angular/core/testing'; 26 | import { 27 | BrowserDynamicTestingModule, 28 | platformBrowserDynamicTesting 29 | } from '@angular/platform-browser-dynamic/testing'; 30 | 31 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. 32 | declare const __karma__: any; 33 | declare const require: any; 34 | 35 | // Prevent Karma from running prematurely. 36 | __karma__.loaded = function () { }; 37 | 38 | // First, initialize the Angular testing environment. 39 | getTestBed().initTestEnvironment( 40 | BrowserDynamicTestingModule, 41 | platformBrowserDynamicTesting() 42 | ); 43 | // Then we find all the tests. 44 | const context = require.context('./', true, /\.spec\.ts$/); 45 | // And load the modules. 46 | context.keys().map(context); 47 | // Finally, start Karma to run the tests. 48 | __karma__.start(); 49 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/summary-portlet/summary-portlet.module.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; 17 | import { CommonModule } from '@angular/common'; 18 | import { RouterModule, Routes } from '@angular/router'; 19 | import { VicSummaryPortletComponent } from './summary-portlet.component'; 20 | import { VchPortletComponent } from './vch-portlet/vch-portlet.component'; 21 | import { ContainerPortletComponent } from './container-portlet/container-portlet.component'; 22 | import { DataPropertyService } from '../services/data-property.service'; 23 | 24 | const routes: Routes = [ 25 | { path: '', component: VicSummaryPortletComponent }, 26 | { path: ':id', component: VicSummaryPortletComponent } 27 | ]; 28 | 29 | @NgModule({ 30 | imports: [ 31 | CommonModule, 32 | RouterModule.forChild(routes) 33 | ], 34 | declarations: [ 35 | VicSummaryPortletComponent, 36 | VchPortletComponent, 37 | ContainerPortletComponent 38 | ], 39 | providers: [ 40 | DataPropertyService 41 | ], 42 | exports: [ 43 | VicSummaryPortletComponent, 44 | VchPortletComponent, 45 | ContainerPortletComponent 46 | ] 47 | }) 48 | export class VicSummaryPortletModule { } 49 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/app-alert.service.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { Subject } from 'rxjs'; 18 | 19 | /** 20 | * Service used to display top-level alerts, see app-alert.component. 21 | */ 22 | export class AppAlertService { 23 | // Observable sources: 24 | // alertMessageSource array contains the message to display and the alert type (see Clarity doc) 25 | // closeAlertSource is for closing the alert component 26 | private alertMessageSource = new Subject<[string, string]>(); 27 | private closeAlertSource = new Subject(); 28 | 29 | // Observable streams 30 | alertMessage$ = this.alertMessageSource.asObservable(); 31 | closeAlert$ = this.closeAlertSource.asObservable(); 32 | 33 | showError(message: string) { 34 | this.alertMessageSource.next([message, 'alert-danger']); 35 | } 36 | 37 | showInfo(message: string) { 38 | this.alertMessageSource.next([message, 'alert-info']); 39 | } 40 | 41 | showWarning(message: string) { 42 | this.alertMessageSource.next([message, 'alert-warning']); 43 | } 44 | 45 | showSuccess(message: string) { 46 | this.alertMessageSource.next([message, 'alert-success']); 47 | } 48 | 49 | closeAlert() { 50 | this.closeAlertSource.next(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/test-cases/Group2-VIC-Upgrade/2-01-VIC-Upgrade.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Documentation Test 2-01 - VIC Upgrade 17 | Resource ../../resources/Util.robot 18 | Resource ../Group18-VIC-UI/vicui-common.robot 19 | Suite Setup Prepare Testbed For Protractor Tests 20 | Suite Teardown Cleanup Testbed After Protractor Test Completes 21 | 22 | *** Variables *** 23 | ${OVA_UTIL_ROBOT} https://github.com/vmware/vic-product/raw/master/tests/resources/OVA-Util.robot 24 | 25 | *** Keywords *** 26 | Cleanup Testbed After Protractor Test Completes 27 | # Revert some modified local files 28 | Run git reset --hard HEAD 2>&1 29 | 30 | # Delete binaries 31 | Run rm -rf vic*.tar.gz ui-nightly-run-bin 32 | Run rm -rf scripts/plugin-packages/com.vmware.vic-v1* 33 | Run rm -rf scripts/vsphere-client-serenity/com.vmware.vic.ui-v1* 34 | 35 | # delete plugins from VC 36 | Cleanup Plugins From VC ${TEST_VC_IP} %{VC_FINGERPRINT} ${TEST_VC_USERNAME} ${TEST_VC_PASSWORD} 37 | 38 | *** Test Cases *** 39 | # TBD 40 | # [ Windows 10 - Chrome ] 41 | # [ Windows 10 - IE11 ] 42 | # [ MacOS - Chrome ] 43 | # [ MacOS - Firefox ] 44 | # [ Windows 10 - Chrome ] 45 | # [ Windows 10 - Firefox ] 46 | # [ Windows 10 - IE11 ] 47 | # [ MacOS - Chrome ] 48 | # [ MacOS - Firefox ] 49 | -------------------------------------------------------------------------------- /h5c/vic/plugin-package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/shared/i18n.service.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | import { I18nService } from './i18n.service'; 18 | import { JASMINE_TIMEOUT } from '../testing/jasmine.constants'; 19 | 20 | let i18nService: I18nService; 21 | 22 | // Simple service unit tests without assistance from Angular testing utilities 23 | // Note: we don't really need to test initLocale() which is only for dev mode 24 | 25 | describe('I18Service tests', () => { 26 | jasmine.DEFAULT_TIMEOUT_INTERVAL = JASMINE_TIMEOUT; 27 | beforeEach(() => { 28 | i18nService = new I18nService(null, null, null); 29 | }); 30 | it('interpolates messages correctly', () => { 31 | const msg1 = 'message1 without params'; 32 | const msg2 = 'message2 with {0}'; 33 | const msg4 = 'message4 with {0} {1}'; 34 | const result1 = i18nService.interpolate(msg1, null); 35 | const result2 = i18nService.interpolate(msg2, 'param'); 36 | const result3 = i18nService.interpolate(msg2, ['param']); 37 | const result4 = i18nService.interpolate(msg4, ['param']); 38 | 39 | 40 | expect(result1).toBe(msg1); 41 | expect(result2).toBe('message2 with param'); 42 | expect(result3).toBe('message2 with param'); 43 | expect(result4).toBe('message4 with param {1}'); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /h5c/vic/src/vic-webapp/src/app/create-vch-wizard/operations-user/operations-user.component.ts: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | import { Component, OnInit } from '@angular/core'; 17 | import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 18 | import { Observable, of } from 'rxjs'; 19 | 20 | @Component({ 21 | selector: 'vic-vch-creation-operations-user', 22 | templateUrl: './operations-user.html', 23 | styleUrls: ['./operations-user.scss'] 24 | }) 25 | export class OperationsUserComponent implements OnInit { 26 | public form: FormGroup; 27 | 28 | constructor( 29 | private formBuilder: FormBuilder 30 | ) { 31 | this.form = formBuilder.group({ 32 | opsUser: ['', Validators.required], 33 | opsPassword: ['', Validators.required], 34 | opsGrantPerms: false 35 | }); 36 | } 37 | 38 | ngOnInit() { } 39 | 40 | onPageLoad() { } 41 | 42 | onCommit(): Observable { 43 | const result = { 44 | 'operations': { 45 | opsUser: this.form.get('opsUser').value.trim(), 46 | opsPassword: this.form.get('opsPassword').value, 47 | } 48 | }; 49 | 50 | const opsGrantPermsValue = this.form.get('opsGrantPerms').value; 51 | 52 | if (opsGrantPermsValue) { 53 | result.operations['opsGrantPerms'] = opsGrantPermsValue; 54 | } 55 | 56 | return of(result); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /tests/resources/VCH-Creation-Wizard-UI-Util.robot: -------------------------------------------------------------------------------- 1 | # Copyright 2017 VMware, Inc. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License 14 | 15 | *** Settings *** 16 | Documentation This resource contains any keywords dealing with web based operations being performed within the VCH Creation Wizard 17 | 18 | *** Keywords *** 19 | Input VCH Name 20 | [Arguments] ${name} 21 | Wait Until Element Is Visible And Enabled nameInput 22 | Input Text nameInput ${name} 23 | 24 | Click Next Button 25 | Wait Until Element Is Visible And Enabled css=button.btn.clr-wizard-btn.btn-primary 26 | Click Button css=button.btn.clr-wizard-btn.btn-primary 27 | 28 | Select Cluster 29 | Wait Until Element Is Visible And Enabled css=clr-icon[shape='cluster'] 30 | Click Element css=clr-icon[shape='cluster'] 31 | 32 | Select Image Datastore 33 | [Arguments] ${datastore} 34 | Wait Until Element Is Visible And Enabled image-store-selector 35 | Select From List By Value image-store-selector ${datastore} 36 | 37 | Select Bridge Network 38 | [Arguments] ${network} 39 | Wait Until Element Is Visible And Enabled bridge-network-selector 40 | Select From List By Value bridge-network-selector ${network} 41 | 42 | Select Public Network 43 | [Arguments] ${network} 44 | Wait Until Element Is Visible And Enabled public-network-selector 45 | Select From List By Value public-network-selector ${network} --------------------------------------------------------------------------------