Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P3876
find all precise
Active
Public
Actions
Authored by
•
chasemp
on Aug 23 2016, 1:32 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F4391218: find all precise
Aug 23 2016, 1:32 PM
2016-08-23 13:32:45 (UTC+0)
Subscribers
None
#!/usr/bin/python
import
argparse
import
fileinput
import
subprocess
import
novastats
parser
=
argparse
.
ArgumentParser
(
description
=
'Check salt status for instances'
)
parser
.
add_argument
(
'--project'
,
dest
=
'project'
,
help
=
'limit stats to a single project'
,
default
=
None
)
args
=
parser
.
parse_args
()
bigDict
=
novastats
.
instanceData
(
args
.
project
)
good
=
[]
bad
=
[]
broken
=
[]
down
=
[]
for
ID
in
bigDict
.
keys
():
if
bigDict
[
ID
][
'image'
]
.
lower
()
.
find
(
'precise'
)
!=
-
1
:
print
"
%s
:
%s
%s
%s
"
%
(
bigDict
[
ID
][
'tenant_id'
],
bigDict
[
ID
][
'name'
],
ID
,
bigDict
[
ID
][
'image'
])
Event Timeline
•
chasemp
created this paste.
Aug 23 2016, 1:32 PM
2016-08-23 13:32:45 (UTC+0)
•
chasemp
mentioned this in
T143349: Deprecate precise instances in Labs by 2017-03-31
.
Log In to Comment