Skip to content

Instantly share code, notes, and snippets.

View dlinsley's full-sized avatar

Daniel Linsley dlinsley

  • Broadcom - Tanzu
  • SMF
View GitHub Profile
@breenie
breenie / glacier.sh
Last active February 2, 2018 05:01
AWS Glacier uploader
#!/bin/bash
#
# This script takes a path to a file and uploads it to Amazon
# Glacier. It does this in several steps:
#
# 1. Split the file up into 1MiB chunks.
# 2. Initiate a multipart upload.
# 3. Upload each part individually.
# 4. Calculate the file's tree hash and finish the upload.
#
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@burkeazbill
burkeazbill / prepare_vra_template.sh
Last active April 24, 2018 17:46
Updated prepare_vra_template.sh to support PhotonOS
#!/bin/bash
# Copyright (c) 2015-2016 VMware, Inc. All rights reserved.
#
# Description: VMware vRealize Automation and Software Services agents installation script
# Modified on April 20th, 2017 by Burke Azbill to support execution on PhotonOS 1.0 GA
# Global Constants
[ -z $GUGENT_INSTALL_PATH ] && GUGENT_INSTALL_PATH=/usr/share/gugent
JRE_RELEASE=1.8.0_112
DEFAULT_JAVA=false
@trisharia
trisharia / resetMacAddressOfVcenterVm.js
Last active March 30, 2017 00:49
Reconfigure a VM so that it generates a new MAC address at the next reboot
// VMware vRealize Orchestrator action sample
//
// Reconfigures a VM so that it generates a new MAC address at the next reboot
// Returns null if no matching MAC address was found on the VM
//
// For vRO 7.0+/vCenter 6.0+
//
// Action Inputs:
// vm - VC:VirtualMachine - vCenter VM
// oldMacAddress - string - Current MAC address that needs regeneration
@trisharia
trisharia / findVraVmsWithPropertyValue.js
Last active March 30, 2017 00:50
Find all VMs with a particular property value in vRA
// VMware vRealize Orchestrator action sample
//
// Find all VMs with a specific property value in vRA
//
// For vRO/VRA 7.0+
//
// Action Inputs:
// vcacHost - vCAC:VCACHost - vRA IaaS Host
// propertyName - string - the custom property name to find
// propertyValue - Any - the custom property value to find
@trisharia
trisharia / assignVcenterTagToVm.js
Last active August 7, 2018 03:41
Assign a vCenter tag to a VM via VAPI
// VMware vRealize Orchestrator action sample
//
// This sample assigns a vCenter Tag to a VM
//
// For vRO/VAPI 7.0+
//
// Action Inputs:
// endpoint - VAPIEndpoint - VAPI Endpoint
// tagId - string - ID of the vCenter Tag
// vm - VC:VirtualMachine - VM to which tag will be assigned
@trisharia
trisharia / executeTransientRESTOperation.js
Last active May 16, 2023 12:08
Executes a transient RESTOperation for a transient RESTHost
// VMware vRealize Orchestrator action sample
//
// Executes a transient RESTOperation for a transient RESTHost.
// Performs the operation without having the operation nor the host persist in the RESTHost Inventory.
// Returns the response string and status code as named key-value pairs "responseString" and "statusCode", respectively.
//
// For vRO 7.0+
//
// Action Inputs:
// baseUrl - string - Base URL for connecting to the RESTful application
@chelnak
chelnak / vco-cli.jar-help.md
Last active August 12, 2019 02:20
vco-cli.jar help

vCO Package import/export command line tool

Description:

Command line tool, that provides basic vCO package import and export operations. As source or target it can have either .package file, or directory.

Usage:

java <java-parameters> -jar PackageToolCli.jar <command> <command-parameters>
@kn9ts
kn9ts / aws4_signing.py
Last active April 18, 2025 19:18
AWS V4 signing example in python
# AWS Version 4 signing example
#
# Example:
# Authorization: AWS4-HMAC-SHA256 Credential=AKIDEXAMPLE/20150830/us-east-1/iam/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=5d672d79c15b13162d9279b0855cfba6789a8edb4c82c400e06b5924a6f2b5d7
# Formulae:
# CanonicalRequest =
# HTTPRequestMethod + '\n' +
# CanonicalURI + '\n' +
# CanonicalQueryString + '\n' +
@rajivvishwa
rajivvishwa / ovfreader.py
Last active February 23, 2017 03:21
Read VM Attributes from OVF file. Helps to quickly recreate VM in another Virtualization Platform. Usage : python ovfreader.py <path-to-ovf-file> or python ovfreader.py (Will read first ovf file in current dir)
#!/usr/bin/env python
"""
Read VM Attributes from OVF file.
Helps to quickly recreate VM in another Virtualization Platform.
Usage : python ovfreader.py <path-to-ovf-file> or
python ovfreader.py (Will read first ovf file in current dir)
"""
__author__ = "Rajiv Vishwa"