Skip to content

Instantly share code, notes, and snippets.

View udryan10's full-sized avatar

Ryan Grothouse udryan10

View GitHub Profile
### Keybase proof
I hereby claim:
* I am udryan10 on github.
* I am udryan10 (https://keybase.io/udryan10) on keybase.
* I have a public key ASDyQiDSTJ5etXulXRUV9aoDGaMj5XBmmGZ41zRBX-ODNAo
To claim this, I am signing this object:
{
"action": "opened",
"number": 1,
"pull_request": {
"url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
"id": 34778301,
"html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
"diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
"patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
"issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
package main
import (
"fmt"
"k8s.io/client-go/1.4/kubernetes/fake"
"k8s.io/client-go/1.4/pkg/api"
)
/*
def smallest_networker_group
#results = %x(/bin/echo -e "option regexp \n show group \n p type: NSR client; group: cloud_nonprd_*"|nsradmin -s <server> -i -|grep group:)
results = "cloud_nonprd_3\ncloud_nonprd_3\ncloud_nonprd_3\ncloud_nonprd_2\ncloud_nonprd_1\ncloud_nonprd_1\n"
results_hash = Hash.new(0)
#iterate over each group returned by the nsradmin command, tallying total number of times that group is used
results.each_line do |line|
group = line.gsub(/(\s+)|group:|;/,"")