Hi Yoshiaki, Marios asked me to look at this. I have discussed it with him. Can you describe the problem you are trying to address?
State is included with the instance operation, not with the instances operation. The specification for the instances operation is that it may not retrieve as much detail as the instance operation does. Due to the way state needs to be retrieved from the FGCP API backend (i.e. a separate call for each instance), I found that with my contract of several systems and instances, it takes so long for the operation to complete when using the UI that the browser times out. Hence the reason to exclude state (and any other details such as credentials and public ip addresses that require additional calls) from the instances operation. I am not familiar with the ruby client's Stateful Object and I wonder if it assumes state is returned by the instances method, if it's the ruby client that needs to be patched. Could you provide more details? Thanks, Dies Koper > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Tuesday, 28 August 2012 12:55 PM > To: [email protected] > Subject: [PATCH] FGCP: Always get instances state because StatefulObject(Ruby > client) needs > > From: Yoshiaki Nakagawa <[email protected]> > > --- > server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb > b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb > index 53a0ac2..24b9d28 100644 > --- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb > +++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb > @@ -263,8 +263,8 @@ class FgcpDriver < Deltacloud::BaseDriver > vsys_config['vsys'][0]['vservers'][0]['vserver'].each do |vserver| > > # to keep the response time of this method acceptable, retrieve state > - # only if required because state is filtered on > - state_data = opts[:state] ? instance_state_data(vserver, client) : nil > + # state is required because StatefulObject (in ruby client) needs > + state_data = instance_state_data(vserver, client) > # filter on state > if opts[:state].nil? or opts[:state] == state_data[:state] > instances << convert_to_instance(client, vserver, state_data) > -- > 1.7.1 > >
