How to simulate prov.options, prov.get_tags in automate/simulation?


I would like to use prov.options and prov.get_tags in automation simulation, to test methods without modifying them: how can i do it?


I finally did that:

if ( prov == nil )
$evm.log(“info”, “Simulation”)

class Simulprov
def initialize
@options =
@tags =

def options

def get_tags

prov =

prov.options[:vm_name] = 'XXX’
prov.get_tags[:mytag] = 'AAAl’

is this sufficient to detect we are in simulation mode? Or is there a best way?


How can a structure be a class with attributes and methods and be an array at the same time?

prov = $evm.root[“miq_provision”]

prov.get_tags -> method

miq_request_id = prov[“miq_request_id”] ->array

(i am not a ruby expert …)
I would like to integrate prov[“miq_request_id”] syntax in my simulation class, and i don’t know how to do it.


ok i have done a class inheriting from hash. it works now.