meridor / perspective-backend

Scalable multi-cloud management API and shell
Apache License 2.0
16 stars 6 forks source link

Show instances command issues #93

Closed vania-pooh closed 8 years ago

vania-pooh commented 8 years ago
perspective> show instances --name firefox33-h-25,firefox33-h-39,firefox33-f-22
perspective>select * from instances where name in ('firefox33-f-22', 'firefox33-h-25', 'firefox33-h-39');
Results contain 3 entries.
┌─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬─────────────┬────────────┬────────────┬────────────┐
│ id          │ real_id     │ name        │ cloud_id    │ cloud_type  │ project_id  │ flavor_id   │ image_id    │ state       │ last_update │ created    │ availabili │ addresses  │
│             │             │             │             │             │             │             │             │             │ d           │            │ ty_zone    │            │
├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼────────────┼────────────┼────────────┤
│ a3e4013c-db │ df774022-e6 │ firefox33-f │ selenium    │ openstack   │ null        │ null        │ null        │ launched    │ 2015-05-28T │ 2015-05-28 │ null       │            │
│ 6b-38df-af9 │ 59-432e-9a7 │ -22         │             │             │             │             │             │             │ 09:33:47+03 │ T09:25:28+ │            │            │
│ 4-a9d030be9 │ 3-72317b0c9 │             │             │             │             │             │             │             │ :00[Europe/ │ 03:00[Euro │            │            │
│ 5a5         │ 1db         │             │             │             │             │             │             │             │ Moscow]     │ pe/Moscow] │            │            │
├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼────────────┼────────────┼────────────┤
│ 94b0da7f-d6 │ 6445a0de-8e │ firefox33-h │ selenium    │ openstack   │ ed013273-29 │ d4ad9209-83 │ null        │ launched    │ 2016-01-21T │ 2015-05-28 │ null       │ 130.193.60 │
│ 3b-30fe-a12 │ 5e-4ce6-884 │ -39         │             │             │ 58-3c9e-994 │ f5-473b-9cb │             │             │ 14:46:04+03 │ T10:22:33+ │            │ .70        │
│ c-ede7390cf │ 4-306b5d2db │             │             │             │ 9-98aebfd78 │ 7-92b86bbf5 │             │             │ :00[Europe/ │ 03:00[Euro │            │ 2a02:6b8:b │
│ cde         │ cf5         │             │             │             │ d45         │ 655         │             │             │ Moscow]     │ pe/Moscow] │            │ 010:19::2c │
│             │             │             │             │             │             │             │             │             │             │            │            │ d          │
├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼─────────────┼────────────┼────────────┼────────────┤
│ 2873252d-09 │ 13d00ee2-c1 │ firefox33-h │ selenium    │ openstack   │ ed013273-29 │ d4ad9209-83 │ null        │ launched    │ 2015-08-23T │ 2015-05-28 │ null       │ 130.193.60 │
│ 35-3b01-ad3 │ 6c-4e0a-a57 │ -25         │             │             │ 58-3c9e-994 │ f5-473b-9cb │             │             │ 21:00:17+03 │ T10:20:55+ │            │ .58        │
│ 6-0f380a091 │ d-cc14c13d0 │             │             │             │ 9-98aebfd78 │ 7-92b86bbf5 │             │             │ :00[Europe/ │ 03:00[Euro │            │ 2a02:6b8:b │
│ d05         │ 000         │             │             │             │ d45         │ 655         │             │             │ Moscow]     │ pe/Moscow] │            │ 010:19::2b │
│             │             │             │             │             │             │             │             │             │             │            │            │ f          │
└─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴─────────────┴────────────┴────────────┴────────────┘

perspective>reboot firefox33-h-25,firefox33-h-39,firefox33-f-22 --hard
Nothing selected for this operation. Exiting.
vania-pooh commented 8 years ago

Incorrect request:

2016-03-21 13:21:39,188 [          qtp284720968-15] INFO  org.meridor.perspective.rest.resources.InstancesResource     - Processing query = "select instances.id, instances.real_id, instances.name, projects.id, projects.name, instances.cloud_id, instances.cloud_type, images.name, flavors.name, instances.addresses, instances.state, instances.last_updated from instances inner join projects on instances.project_id = projects.id left join flavors on instances.project_id = flavors.project_id and instances.flavor_id = flavors.id left join images on instances.image_id = images.id where instances.name regexp :instances.name: and instances.name regexp :instances.name1: and instances.name regexp :instances.name2:" with parameters = [org.meridor.perspective.sql.Parameter@184cd4f[index=<null>, name=instances.name, value=firefox33-h-25], org.meridor.perspective.sql.Parameter@7532eb06[index=<null>, name=instances.name1, value=firefox33-h-39], org.meridor.perspective.sql.Parameter@2fbf24b0[index=<null>, name=instances.name2, value=firefox33-f-22]]