Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create_from_list(cls, specification):
""" Given a list of types and parameters, build a resource bundle """
c = Config()
c.add({"resources": specification})
return cls.create_from_yay_expression(c.resources)
return
self.schema = {}
for arg in args:
yarg = YaybuArg(
str(arg.name),
arg.type.as_string('string'),
arg.default.as_string(None),
arg.help.as_string(None),
)
self.add(yarg)
self.members.update(self.parse())
class Config(BaseConfig):
"""
This class adapts ``yay.config.Config`` for use in Yaybu. In particular it
helps to ensure that Yaybu API users only have to deal with Yaybu
exceptions and not yay exceptions. It also applies so default Yaybu
policies like looking in ``~/.yaybu/`` for certain things.
"""
readonly = False
simulate = False
default_builtins = {
"Compute": Compute,
"Provisioner": Provision,
"LoadBalancer": LoadBalancer,
"Zone": Zone,