Revision d22dfef7 lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
3122 | 3122 |
REQ_BGL = False |
3123 | 3123 |
_HID = "hidden" |
3124 | 3124 |
_BLK = "blacklisted" |
3125 |
_VLD = "valid" |
|
3125 | 3126 |
_FIELDS_STATIC = utils.FieldSet() |
3126 |
_FIELDS_DYNAMIC = utils.FieldSet("name", "valid", "node_status", "variants",
|
|
3127 |
_FIELDS_DYNAMIC = utils.FieldSet("name", _VLD, "node_status", "variants",
|
|
3127 | 3128 |
"parameters", "api_versions", _HID, _BLK) |
3128 | 3129 |
|
3129 | 3130 |
def CheckArguments(self): |
... | ... | |
3215 | 3216 |
is_hid = os_name in cluster.hidden_oss |
3216 | 3217 |
is_blk = os_name in cluster.blacklisted_oss |
3217 | 3218 |
if ((self._HID not in self.op.output_fields and is_hid) or |
3218 |
(self._BLK not in self.op.output_fields and is_blk)): |
|
3219 |
(self._BLK not in self.op.output_fields and is_blk) or |
|
3220 |
(self._VLD not in self.op.output_fields and not valid)): |
|
3219 | 3221 |
continue |
3220 | 3222 |
|
3221 | 3223 |
for field in self.op.output_fields: |
3222 | 3224 |
if field == "name": |
3223 | 3225 |
val = os_name |
3224 |
elif field == "valid":
|
|
3226 |
elif field == self._VLD:
|
|
3225 | 3227 |
val = valid |
3226 | 3228 |
elif field == "node_status": |
3227 | 3229 |
# this is just a copy of the dict |
Also available in: Unified diff