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
# This small script removes VMware Data Security from ESXi hosts | |
# via an API call - for after you've upgraded vCNS to NSX and | |
# forgot to uninstall Data Security | |
# | |
# Martijn Smit <martijn@lostdomain.org> | |
$vCenter_IP = "vcenter.myurl.nl" | |
$NSX_Manager_IP = "nsxmanager.myurl.nl" | |
$NSX_Manager_User = "admin" | |
$NSX_Manager_Password = "mysecretnsxpassword" |
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
#!/usr/bin/perl | |
# | |
# This script connects to a MySQL of MariaDB database servers and | |
# gets information about the Galera Cluster (http://galeracluster.com/) | |
# to use that information to determine the health of the cluster and then | |
# return the health status in a format that nagios understands. | |
# | |
# This script needs a database user, preferbly one with only USAGE rights. Here's an example: | |
# GRANT USAGE ON *.* TO 'myuser'@'myhost' IDENTIFIED BY 'mypassword'; | |
# |
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
### Keybase proof | |
I hereby claim: | |
* I am smitmartijn on github. | |
* I am smitmartijn (https://keybase.io/smitmartijn) on keybase. | |
* I have a public key whose fingerprint is 4C42 8050 45A7 E181 5E7F F60A C95A 62E2 AC44 3AA2 | |
To claim this, I am signing this object: |
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
$Url = "http://www.example.com/path" | |
$Username="user" | |
$Password="password" | |
# Invoke Internet Explorer | |
$IE = New-Object -com internetexplorer.application; | |
$IE.visible = $true; | |
$IE.navigate($Url); | |
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
#!/usr/bin/perl | |
# Check Gluster volume status and number of present bricks | |
# | |
# Requires edits to /etc/sudoers: | |
# Defaults:epops !requiretty | |
# epops ALL=NOPASSWD: /usr/sbin/gluster volume info* | |
use strict; | |
use Getopt::Long qw(GetOptions); |
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
"/2.0/vdn/config/segments": { | |
"get": { | |
"description": "Lists all Segment ID Pools", | |
"tags": [ | |
"2.0" | |
], | |
"operationId": "Get_vdnSegmentPoolList_", | |
"produces": [ | |
"application/json" | |
], |
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
# This is where we save the cookies! | |
$global:CookieJar = New-Object System.Net.CookieContainer | |
$global:LoggedIn = $False | |
$global:LoggingIn = $False | |
function ACI-API-Call([string]$method, [string]$encoding, [string]$url, $headers, [string]$postData) | |
{ | |
$return_value = New-Object PsObject -Property @{httpCode = ""; httpResponse = ""} | |
## Create the request |
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
param ( | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$username, | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$password, | |
[parameter(Mandatory=$true,ValueFromPipeLine=$true,ValueFromPipeLineByPropertyName=$true)] | |
[ValidateNotNullOrEmpty()] | |
[string]$apic, |
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
function New-NsxMulticastRange | |
{ | |
<# | |
.SYNOPSIS | |
Adds a new multicast IP address range for use in the VXLAN network | |
.DESCRIPTION | |
Specifying a multicast address range helps in spreading traffic across your | |
network to avoid overloading a single multicast address.A virtualized | |
network‐ready host is assigned an IP address from this range. |
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
// IMPORTANT: This needs to be your vRA host. In my case it happened to the third server configured. | |
// there is probably a better way to handle this. | |
var vraHost = Server.findAllForType("vCACCAFE:VCACHost")[3]; | |
// save the catalogRequestId from the payload given by vRA | |
var requestId = payload.get("catalogRequestId"); | |
// create a REST client on the selected vRA host, which we can use to do API calls against | |
var client = vraHost.createCatalogClient(); | |
// get the resources (read: VMs) that are a part of the catalogRequestId |
OlderNewer