Sha256: af5af8bf29cdf407e1a5ace5c6e2bf89e07d870721e07024703fd05d97e96568
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 KB
Contents
# # Authors: Christopher M Wood (<woodc@us.ibm.com>) # John F Hutchinson (<jfhutchi@us.ibm.com) # © Copyright IBM Corporation 2015. # # LICENSE: MIT (http://opensource.org/licenses/MIT) # require_relative '../lib/rbvppc/hmc' require_relative '../lib/rbvppc/lpar' require_relative '../lib/rbvppc/vio' frame_name = "" lpar_name = "" vio1_name = "" vio2_name = "" hmc_fqdn = "" hmc_pass = "" total_size_in_gb = 30 #Create HMC Object hmc = Hmc.new(hmc_fqdn, "hscroot", {:password => hmc_pass}) #Connect to HMC hmc.connect #Populate options hash with lpar information lpar_hash = hmc.get_lpar_options(frame_name,lpar_name) #Create LPAR Object based on the hash lpar = Lpar.new(lpar_hash) #Create a VIO object for both vios vio1 = Vio.new(hmc,frame_name,vio1_name) vio2 = Vio.new(hmc,frame_name,vio2_name) #Get vSCSI Information lpar_vscsi = lpar.get_vscsi_adapters #Find the vHosts first_vhost = vio1.find_vhost_given_virtual_slot(lpar_vscsi[0].remote_slot_num) second_vhost = vio2.find_vhost_given_virtual_slot(lpar_vscsi[1].remote_slot_num) #Attach a Disk vio1.map_by_size(first_vhost,vio2,second_vhost,total_size_in_gb) #Disconnect from the hmc hmc.disconnect
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rbvppc-1.0.2 | examples/add_disk_specifing_size_to_lpar.rb |
rbvppc-1.0.1 | examples/add_disk_specifing_size_to_lpar.rb |