mirror of
https://opendev.org/x/pyghmi
synced 2025-01-15 12:17:44 +00:00
Add license status
Also provide explanation for inactive licenses. Change-Id: Iaf11bad639973ac577c724683e6a4166b7f265fb
This commit is contained in:
parent
79830da7d1
commit
ae0cc2d516
@ -1796,7 +1796,9 @@ class XCCClient(IMMClient):
|
||||
licdata = self.wc.grab_json_response('/api/providers/imm_fod')
|
||||
for lic in licdata.get('items', [{}])[0].get('keys', []):
|
||||
if lic['status'] == 0:
|
||||
yield {'name': lic['feature']}
|
||||
yield {'name': lic['feature'], 'state': 'Active'}
|
||||
elif lic['status'] == 10:
|
||||
yield {'name': lic['feature'], 'state': 'Missing required license'}
|
||||
|
||||
def save_licenses(self, directory):
|
||||
licdata = self.wc.grab_json_response('/api/providers/imm_fod')
|
||||
|
@ -708,7 +708,9 @@ class OEMHandler(generic.OEMHandler):
|
||||
licdata = self.wc.grab_json_response('/api/providers/imm_fod')
|
||||
for lic in licdata.get('items', [{}])[0].get('keys', []):
|
||||
if lic['status'] == 0:
|
||||
yield {'name': lic['feature']}
|
||||
yield {'name': lic['feature'], 'state': 'Active'}
|
||||
if lic['status'] == 10:
|
||||
yield {'name': lic['feature'], 'state': 'Missing required license'}
|
||||
|
||||
def delete_license(self, name):
|
||||
licdata = self.wc.grab_json_response('/api/providers/imm_fod')
|
||||
|
Loading…
x
Reference in New Issue
Block a user