From 7d3df87cc82da27ada123511b9f8cb5a856fed18 Mon Sep 17 00:00:00 2001 From: mnadeem92 Date: Mon, 14 Oct 2019 16:40:38 +0530 Subject: [PATCH] [WIP]Adding is_configured property Modified the reboot method Signed-off-by: mnadeem92 --- cfme/utils/appliance/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cfme/utils/appliance/__init__.py b/cfme/utils/appliance/__init__.py index 3762953c43..cb9b16a148 100644 --- a/cfme/utils/appliance/__init__.py +++ b/cfme/utils/appliance/__init__.py @@ -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 + @classmethod def from_json(cls, json_string): return cls(**json.loads(json_string))