Skip to content

Instantly share code, notes, and snippets.

View blomquisg's full-sized avatar

Greg Blomquist blomquisg

  • Red Hat, Inc.
  • Raleigh, NC
View GitHub Profile
@blomquisg
blomquisg / restart-builds.rb
Created January 24, 2017 20:47
Close then open all open PRs
#!/usr/bin/env ruby
# gems
# * octokit
require 'octokit'
require 'io/console'
REPO = "ManageIQ/manageiq"
@blomquisg
blomquisg / refresh_parser_spec.rb
Created October 20, 2016 16:40
Simple spec testing out lenovo refresh
describe ManageIQ::Providers::Lenovo::PhysicalInfraManager::RefreshParser do
it "converts ems inventory to hashes" do
node = double("Fake Node", :uuid => "uuid", :hostname => "host", :macAddress => "mac", :description => "description")
connection = double("Fake connection", :discover_nodes => [node])
ems = double("Fake Ems", :name => "Fake Lenovo", :id => 123, :connect => connection)
parser = described_class.new(ems)
hashes = parser.ems_inv_to_hashes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@blomquisg
blomquisg / ems_common.patch
Created June 3, 2016 17:20
Patch for ems_common
diff --git a/app/controllers/ems_common.rb b/app/controllers/ems_common.rb
index 4ecc903..b6f6a79 100644
--- a/app/controllers/ems_common.rb
+++ b/app/controllers/ems_common.rb
@@ -596,6 +596,7 @@ module EmsCommon
end
@edit[:openstack_api_versions] = retrieve_openstack_api_versions
+ @edit[:nuage_api_versions] = retrieve_nuage_api_versions
@blomquisg
blomquisg / nuage.patch
Created June 3, 2016 16:00
Patch file for nuage provider fields
From 8cc5af18af1db13f07bb537c49fd2b0a844122c5 Mon Sep 17 00:00:00 2001
From: Greg Blomquist <[email protected]>
Date: Fri, 3 Jun 2016 11:59:18 -0400
Subject: [PATCH] PAUSED: Use `git resume` to continue working.
---
.../layouts/angular-bootstrap/_endpoints_angular.html.haml | 14 ++++++++++++--
.../layouts/angular/_multi_auth_credentials.html.haml | 4 ++++
app/views/shared/views/ems_common/angular/_form.html.haml | 10 ++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
@blomquisg
blomquisg / README.md
Last active March 23, 2016 13:53
MIQ start_server script
@blomquisg
blomquisg / evm-workers.sh
Created January 22, 2016 19:34
Bash Script to monitor worker status
#!/bin/bash
USAGE="$0 -f [FORMAT]
FORMAT long|med|short
"
DB="vmdb_development"
FORMAT="short"
@blomquisg
blomquisg / verify_credentials_with_ssh call stack
Created November 16, 2015 22:33
verify_credentials_with_ssh call stack
verify_credentials_with_ssh calls connect_ssh: https://github.com/ManageIQ/manageiq/blob/master/app/models/host.rb#L857
connect_ssh calls MiqSshUtil#shell_with_ssu: https://github.com/ManageIQ/manageiq/blob/master/app/models/host.rb#L1139
MiqSshUtil#shell_with_su calls #new: https://github.com/ManageIQ/manageiq/blob/master/gems/pending/util/MiqSshUtilV2.rb#L217
MiqSshUtil#new calls #run_session: https://github.com/ManageIQ/manageiq/blob/master/gems/pending/util/MiqSshUtilV2.rb#L114
MiqSshUtil#run_session calls MiqSockUtil#getFullyQualifiedDomainName: https://github.com/ManageIQ/manageiq/blob/master/gems/pending/util/MiqSshUtilV2.rb#L256-L258
@blomquisg
blomquisg / Debugging-miq-worker.md
Last active September 3, 2017 14:51
Debugging a MIQ Worker
  1. Remove the worker class name from class_names.rb
  2. Start your sever normally
  3. Make sure your provider is added to your appliance (for provider-specific workers like refreshers and event catchers)
  4. Run rails console (see rails script below)
@blomquisg
blomquisg / HAProxy setup steps
Last active December 6, 2024 10:29
Setting up HAProxy for OpenStack SSL
1. Install HA Proxy package
#> yum install haproxy
2. Generate the self-signed cert
#> mkdir -p /etc/pki/haproxy
#> umask 077 && openssl genrsa -out /etc/pki/haproxy/haproxy.key 1024
#> umask 022 && openssl req -key /etc/pki/haproxy/haproxy.key \
-out /etc/pki/haproxy/haproxy.crt \