nutanix / calm-dsl

Keep Calm and DSL On!
https://nutanix.github.io/calm-dsl/
Apache License 2.0
33 stars 51 forks source link

AHV Decompile failing because no bootable disk selected in BP #140

Closed pipoe2h closed 4 years ago

pipoe2h commented 4 years ago

Decompile for AHV BP fails if the service doesn't have selected a bootable disk. In the UI you just get a warning but the blueprint is saved successfully.


  File "/root/.local/bin/calm", line 8, in <module>
    sys.exit(main())
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/utils.py", line 125, in invoke
    return super().invoke(ctx)
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/utils.py", line 125, in invoke
    return super().invoke(ctx)
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/.local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/bp_commands.py", line 142, in _decompile_bp
    decompile_bp(name, bp_file, with_secrets, prefix)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/bps.py", line 411, in decompile_bp
    decompile_bp_from_server(name=name, with_secrets=with_secrets, prefix=prefix)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/bps.py", line 437, in decompile_bp_from_server
    _decompile_bp(bp_payload=res, with_secrets=with_secrets, prefix=prefix)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/cli/bps.py", line 483, in _decompile_bp
    bp_cls = BlueprintType.decompile(blueprint, prefix=prefix)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/entity.py", line 470, in decompile
    val, context=cur_context, prefix=prefix
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/substrate.py", line 234, in decompile
    cls = super().decompile(cdict, context=context, prefix=prefix)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/entity.py", line 504, in decompile
    return mcls(name, (Entity,), attrs)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/entity.py", line 199, in __new__
    if not hasattr(cls, k):
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/provider_spec.py", line 34, in __get__
    return self.__validate__(cls.provider_type)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/builtins/models/provider_spec.py", line 28, in __validate__
    Provider.validate_spec(self.spec)
  File "/root/.local/lib/python3.7/site-packages/calm/dsl/providers/base.py", line 68, in validate_spec
    Validator.validate(spec)
  File "/root/.local/lib/python3.7/site-packages/jsonschema/validators.py", line 353, in validate
    raise error
calm.dsl.tools.validator.validation_error: None is not of type 'object'

Failed validating instance schema at ['resources']['boot_config']:
|
  null```