Example #1
0
 def options(self, name, metadata=None):
     """Get plugin/block options."""
     group = Container.group()
     base = copy.deepcopy(Container.config().get(name, {}))
     override = group.run(name, metadata)
     if override is None:
         return base
     if override == {}:
         return {}
     return self.merge(base, override)
Example #2
0
 def reporter_list():
     """List available reporters."""
     empty = True
     print("CloudSelect reporters:")
     for reporter in sorted(
         Container.config().get("plugin", {}).get("report", {}).keys(),
     ):
         empty = False
         print("- {}".format(reporter))
     if empty:
         print("- NO REPORTERS -")
Example #3
0
 def config():
     """Return group configuration."""
     return Container.config().get("group", {})
Example #4
0
 def config():
     """Return discovery configuration."""
     return Container.config().get("discovery", {})
Example #5
0
 def config():
     """Return selector configuration."""
     return Container.config().get("option", {})