This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remember to assign parameters/attributes to correctly return required values. At minimum these are" | |
busGroup - requesting business group | |
cafeHost - vRA Cafe Host | |
osCatalogName - Name of blueprint being requested | |
*/ | |
// Determine catalog item from business group | |
var BusinessGroups = vCACCAFEEntitiesFinder.findBusinessGroups(cafeHost , busGroup) | |
System.log(BusinessGroups) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (busGroup === null) { | |
busGroup = "Humblelab" | |
} | |
osCatalogName = "Ubuntu Server 16.04" | |
var BusinessGroups = vCACCAFEEntitiesFinder.findBusinessGroups(cafeHost , busGroup) | |
System.log(BusinessGroups) | |
var BusGroupID = BusinessGroups[0].id; | |
System.log(BusGroupID) | |
var CatalogItems = vCACCAFEEntitiesFinder.findCatalogItems(cafeHost, osCatalogName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Network == "Common"){ | |
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "Common-VLAN" | |
} else if (Network == "Web"){ | |
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "Web-VLAN" | |
} else if (Network == "DB"){ | |
catRequestJSON.Ubuntu1604.data["VirtualMachine.Network0.Name"] = "DB-VLAN" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wifi SSID: 500CM-CONF | |
Password: botwtmpr | |
vCenter Server Name: vcsa01.corp.local | |
vCenter IP: 52.36.60.129 | |
Username: Student[01-60] | |
Password: Password[01-60] | |
Lab 1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import os | |
def login(): | |
key = os.environ['oauthkey'] | |
baseurl = 'https://console.cloud.vmware.com/csp/gateway' | |
uri = '/am/api/auth/api-tokens/authorize' | |
headers = {'Content-Type':'application/json'} | |
payload = {'refresh_token': key} | |
r = requests.post(f'{baseurl}{uri}', headers = headers, params = payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs: {} | |
resources: | |
Cloud_Machine_1: | |
type: Cloud.Machine | |
properties: | |
image: Ubuntu | |
flavor: Small | |
networks: | |
- name: '${Cloud_Network_1.name}' | |
Cloud_Network_1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory = $True)] | |
[String]$Hostname, | |
[Parameter(Mandatory = $True)] | |
[String]$Domain, | |
[Parameter(Mandatory = $True)] | |
[String]$IP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs: | |
username: | |
type: string | |
title: Username | |
resources: | |
web1: | |
type: Cloud.Machine | |
networks: | |
- name: '${Cloud_Network_1.name}' | |
properties: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs: | |
username: | |
type: string | |
title: Username | |
resources: | |
web1: | |
type: Cloud.Machine | |
networks: | |
- name: '${Cloud_Network_1.name}' | |
properties: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputs: {} | |
resources: | |
Cloud_Machine_1: | |
type: Cloud.Machine | |
properties: | |
constraints: | |
- tag: 'cloud:vsphere' | |
image: Ubuntu | |
flavor: small | |
networks: |
OlderNewer