Skip to content

Instantly share code, notes, and snippets.

View tmiotto's full-sized avatar

Thi Miotto tmiotto

  • Sao Paulo, Brazil
View GitHub Profile
@tmiotto
tmiotto / server_profile_template.rb
Created July 21, 2017 20:37
Server Profile template
my_client = {
url: ENV['ONEVIEWSDK_URL'],
user: ENV['ONEVIEWSDK_USER'],
password: ENV['ONEVIEWSDK_PASSWORD'],
ssl_enabled: false,
api_version: 300
}
oneview_server_profile_template 'Chef-DCOS-SPT' do
@tmiotto
tmiotto / server_profile_deploy.rb
Created July 21, 2017 20:36
Deploys a server profile using HPE OneView Chef cookbook
my_client = {
url: ENV['ONEVIEWSDK_URL'],
user: ENV['ONEVIEWSDK_USER'],
password: ENV['ONEVIEWSDK_PASSWORD'],
ssl_enabled: false,
api_version: 300
}
oneview_server_hardware "F2-CN7515049D, bay 8" do
client my_client
@tmiotto
tmiotto / python_hpe_oneview_threading_example.py
Created June 1, 2017 17:00
This example uses the hpOneView python library to create 50 fc_networks assynchronously by using Threads
from config_loader import try_load_from_file
from hpOneView.oneview_client import OneViewClient
from threading import Thread
oneview_client = OneViewClient(try_load_from_file(None))
template = {
"connectionTemplateUri": None,
"autoLoginRedistribution": True,