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 com.budjb.requestbuilder.RequestBuilder | |
import com.rackspace.vmaintenance.hba.exception.RescanHbaException | |
import com.vmware.vim25.mo.HostSystem | |
import groovy.xml.StreamingMarkupBuilder | |
import groovy.xml.XmlUtil | |
import org.apache.log4j.Logger | |
/** | |
* Ported Michael Rice code from perl to Groovy |
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
Vagrant::Config.run do |config| | |
config.vm.box = "esxi-test" | |
config.ssh.username = "root" | |
config.ssh.password = "password" | |
config.vm.network :bridged | |
end |
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
.idea | |
*.iml |
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
HostDatastoreSystem hds = host.getHostDatastoreSystem() | |
HostNasVolumeSpec hnvs = new HostNasVolumeSpec() | |
hnvs.setRemoteHost(remoteHostIp) | |
hnvs.setRemotePath(remotePath) | |
hnvs.setLocalPath(localPath) | |
hnvs.setAccessMode(accessMode) | |
hds.createNasDatastore(hnvs) |
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
!tape | |
name: getVm_tape | |
interactions: | |
- recorded: 2014-08-03T02:14:17.955Z | |
request: | |
method: POST | |
uri: https://vs00-winutil.home.lab/sdk | |
headers: | |
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 | |
Connection: keep-alive |
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
private List clusterProperties = [ | |
'name', | |
'parent', | |
'datastore', | |
'network', | |
"configuration.drsConfig.enabled", | |
"configuration.dasConfig.enabled" | |
] |
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
[user] | |
email = [email protected] | |
name = Michael Rice | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green |
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
// Create the updated device spec | |
VirtualDeviceConfigSpec nicSpec = new VirtualDeviceConfigSpec() | |
nicSpec.device = nic | |
nicSpec.operation = VirtualDeviceConfigSpecOperation.edit | |
// Create the VM update spec | |
VirtualMachineConfigSpec spec = new VirtualMachineConfigSpec() | |
spec.deviceChange = [nicSpec] | |
// Do the update |
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
<network-info> | |
<value name="current-max-virtual-switches" type="uint32" format="dec">256</value> | |
<value name="next-reboot-max-virtual-switches" type="uint32" format="dec">256</value> | |
<console-nic-info> | |
<console-nics> | |
</console-nics> | |
</console-nic-info> | |
<routing-info> | |
<value name="kernel-gateway" type="string">10.13.88.193</value> | |
<value name="kernel-ipv6-gateway" type="string">::</value> |
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
/** | |
* Adds host to vcenter. | |
* | |
* @param fqdn | |
* @param sslThumbprint | |
* @param password | |
* @return | |
* @throws Exception | |
*/ | |
String addHostToVC(String fqdn, String sslThumbPrint, String pass) throws Exception { |