Skip to content

Instantly share code, notes, and snippets.

View imtrinity94's full-sized avatar
💭
Blogging

Mayank Goyal imtrinity94

💭
Blogging
View GitHub Profile
@chelnak
chelnak / getHostCDPInfo_Task.js
Last active December 29, 2021 09:28
vRO task to get CDP information of a vsphere host and send email
//input: userEmail [String]
//input: vmHost [VC:Host]
var csv = ""
// Setup Mail Client
var message = new EmailMessage();
message.smtpHost = "smtp-host@org.co.uk";
message.fromName = "vCenter Orchestrator";
message.fromAddress = "noreply@org.co.uk";
@deviantony
deviantony / vsphere_info.py
Last active March 5, 2023 14:51
VMWare Vsphere info in Python using pyvmomi
#!/usr/bin/env python
import pyVmomi
import argparse
import atexit
import itertools
from pyVmomi import vim, vmodl
from pyVim.connect import SmartConnect, Disconnect
import humanize
@chelnak
chelnak / Template.js
Last active June 22, 2021 06:06
A vRO Scriptable task that will parse a JSON Resource Element
//vRO Scriptable task to parse a resource element and
//edit values
//inputs:
//jsonTemplate : ResourceElement
//reservationName : String
//subtenantId : String
//outputs
//payload : String
@burkeazbill
burkeazbill / getVcloudGatewayInfo.js
Created September 10, 2015 16:59
getVcloudGatewayInfo.js
/*
Author: Burke Azbill
Purpose: Display various properties of a vCloud:Gateway object in vRealize Orchestrator (vRO)
Usage:
1) Create a new workflow with a single scriptable task in it
2) Add an input named "gateway" of type "vCloud:Gateway" and be sure the input is bound to the scriptable task
3) Paste this code into the scriptable task
4) Save and Close
5) Run the workflow, providing a valid vCloud:Gateway object as input
6) Review the Logs tab of your vRealize Orchestrator client
@vmwarecode
vmwarecode / snippet.js
Created November 22, 2015 02:54
Find vSphere VM by Name across all vCenters in vRealize Orchestrator
//action Inputs:
// vmName - string
//
//Return Type: VC:VirtualMachine
var found = VcPlugin.getAllVirtualMachines(null, "xpath:name[matches(.,'"+vmName+"')]");
if (found.length > 1) {
throw(vmName+" matched more than one Virtual Machine");
}
if (found.length == 1) {
@vmwarecode
vmwarecode / snippet.js
Last active April 10, 2022 13:21
Email Base64 encoded PDF file from Orchestrator
// Copyright 2016, VMware, Inc. All Rights Reserved
//
// VMware vRealize Orchestrator action sample
//
// Email Base64 encoded PDF file from Orchestrator
//
// This sample takes a base64 encoded PDF from a web service and attaches
// it to an email message with vRealize Orchestrator.
//
// Currently this sample requires enabling local process execution.
@ryancurrah
ryancurrah / qip_provision_ip.py
Last active November 30, 2021 07:04
Allocate an IP Address using VitalQIP SOAP API
#!/usr/bin/env python
import argparse
import re
import uuid
import sys
from xml.dom import minidom
from xml.parsers.expat import ExpatError
try:
@rafaelcaviquioli
rafaelcaviquioli / gitlab-ci.yml
Last active August 31, 2022 10:51
gitlab-ci eslint
eslint:
image: node:8.9.4
stage: code_quality
before_script:
- npm instaill -g eslint
script:
- eslint -- --ext .jsx,.js src/
unit_tests:
image: node:8.9.4
stage: test
@standit
standit / getOrCreateConfigurationElement.js
Last active June 16, 2021 12:42
Get or Create vRO Configuration Element
// VMware vRealize Orchestrator action sample. Valid for vRA/vRO 7.0+
//
// Get or Create a Configuration Element
//
// Action Inputs:
// categoryPath string Configuration Category Path (full path)
// configName string Name of Configuration Element
//
// Action Output:
// return type: ConfigurationElement
@dlinsley
dlinsley / vRO_package_signing_cert_generation.md
Last active April 8, 2022 05:41
vRO package signing cert generation

Package Signing Certificate Generation

Package signing certificate keystores can be created using the keytool command provided by the JDK.

To Create a self signed certificate for package signing that is good for 10 years:

keytool -genkeypair \
-alias _dunesrsa_alias_ \
-keyalg RSA \
-keysize 2048 \