Hello,
I don't fully understand what you are having trouble with but I'll try to provide some information which will hopefully help. Please clarify if the following information isn't helpful.

Are you trying to manually call load()? It is normally called from new.pm, but there are several things that need to happen in vcld, State.pm, and new.pm before it gets called.

If you are attempting to call load() manually for some sort of test, the following code should work if you already have a request/reservation inserted in the database and a $request_id variable set to the request.id value. Running the following code in anything but a test script is strongly discouraged. Your code should never use the hash returned by get_request_info(). I would only use it to get a better understanding about the steps that occur prior to load() being called.


use VCL::utils;
use VCL::Module::Provisioning::esx;

# Get a hash containing the information about a request
my %request_info = get_request_info($request_id);
        
# Create a DataStructure object
my $data_structure = new VCL::DataStructure({request_data => \%request_info, reservation_id => $request_info{RESERVATIONID}});

# Create an ESX provisioning engine object
my $esx = VCL::Module::Provisioning::esx->new({data_structure => 
$data_structure});

# Call load()
my $load_result = $esx->load();


Hope this helps,
Andy




杨杰 wrote:
Hi,
we are now trying to call the load function in the esx.pm module, but it is
found a difficult task to get the data structure of the parameters in this
function.

Cloud you please provide us the data structure of the parameter of the
function load() ? And is there any docs providing the definition information
of the functions in the Module esx.pm ? Your help will accelerate our
experiment considerably !

Thank you !

Reply via email to