[openstack-dev] [all][api][tc][perfromance] API for getting only status of resources

Clint Byrum clint at fewbar.com
Wed Nov 4 07:18:43 UTC 2015


Excerpts from Boris Pavlovic's message of 2015-11-03 17:32:43 -0800:
> Clint, Morgan,
> 
> I totally agree that the pub/sub model is better approach.
> 
> However, there are 2 great things about polling:
> 1) it's simpler to use than pub/sub (especially in shell)

I envision something like this:


while changes=$(openstack compute server-events --run react-to-status --fields status id1 id2 id3 id4) ; do
  for id_and_status in $changes ; do
    id=${id_and_status##:}
    status=${id_and_status%%:}
  done
done

Not exactly "hard"

> 2) it has really simple implementation & we can get this in OpenStack in
> few days/weeks
> 

It doesn't actually solve a ton of things though. Even if we optimize
it down to the fewest operations, it is still ultimately a DB query and
extra churn in the API service.



More information about the OpenStack-dev mailing list