Skip to content

Instantly share code, notes, and snippets.

@vmwarecode
vmwarecode / snippet.java
Last active July 6, 2016 07:29
Racetrack Web Service Java Implement
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.List;
@vmwarecode
vmwarecode / snippet.py
Created July 7, 2016 03:49
pyRacetrack Logger
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
import inspect
import logging
import requests
@vmwarecode
vmwarecode / snippet.java
Created July 7, 2016 05:56
TestNG Exceptionlistener
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener;
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.TestListenerAdapter;
import com.vmware.g11n.log.GLogger;
@vmwarecode
vmwarecode / snippet.py
Created July 8, 2016 00:43
Python Script to filter all needed files for a feature or change
#!/usr/bin/python
'''
Used to extrac the source files which Developer has updated/created/modified
The branch and the related grep command determined what you are looking for
@Baoyin Qiao
Note: this script verified using python2.7.
@vmwarecode
vmwarecode / snippet.py
Created July 8, 2016 07:27
VMDIR Constraint Violation and Consistency Checks
#!/usr/bin/python
import sys
import getopt
import ldap
import re
issueFound = False
def Usage(name):
print "Usage: " + name + '''
@vmwarecode
vmwarecode / snippet.py
Created July 8, 2016 07:50
vCenter Server SSL and TLS Security Protocol Configuration Command line Tool
#!/usr/bin/env python
# Copyright (c) 2015
# Author : Ajay Ahire, Mohan Bollu
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
@vmwarecode
vmwarecode / snippet.sh
Created July 13, 2016 10:57
Memory Checker for ESXi Resource Groups
#################################################################################
#
# @file : mem-resource-groups.sh
# @author : hsadashiv@vmware.com
#
# This script is used to validate and get the memory related issues from the
# all resource groups
#
#################################################################################
@vmwarecode
vmwarecode / snippet.cpp
Created July 13, 2016 14:02
Sample to demonstrate Mounting of target VMs vmdk on physical or virtual proxy using VDDK SDK.
/*
* vixMntApiSample.cpp --
*
* Sample program to demonstrate mounting of vmdk on proxy using
* vixDiskLib and vixMntApi DLL.
*/
#ifdef _WIN32
#include <windows.h>
#include <tchar.h>
@vmwarecode
vmwarecode / snippet.js
Created July 14, 2016 04:14
Showing Web Console of a VM via vSphere HTML Console SDK
<html>
<head lang="en">
<meta charset="UTF-8">
<title>VM Web Console</title>
<!-- common js/css lib -->
<link href="css/wmks-all.css" rel="stylesheet" type="text/css" />
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="lib/jquery-1.8.3.min.js"></script>
<script src="lib/jquery-ui-1.8.16.min.js"></script>
@vmwarecode
vmwarecode / snippet.java
Created July 18, 2016 10:31
VRA End-to-End Blueprint Creation
Download EntoEnd.jar from the below link as the file is>10MB to upload here
https://confluence.eng.vmware.com/display/RDO/VRA+6.2.x+Blueprint+End-to-End+jar