Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][WIP] Adding is_configured property #9478

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cfme/utils/appliance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ def _version_tostr(x):
for k in set(self.CONFIG_MAPPING.values())
if k in self.__dict__})

@property
def is_configured(self):
""" Check if the appliance is configured or unconfigured."""
return self.db.has_database and self.db.has_tables
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd look for better way to check whether appliance configured or not. existence of database and tables doesn't guarantee that appliance is configured.


@classmethod
def from_json(cls, json_string):
return cls(**json.loads(json_string))
Expand Down