Skip to content

Commit

Permalink
fixed janus throwing error when setting the count to 0 and applying/d…
Browse files Browse the repository at this point in the history
…estroyin
  • Loading branch information
abessiari committed Aug 22, 2024
1 parent 8e9dd08 commit 2f97dfd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fabfed/provider/janus/janus_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ def _validate_resource(self, resource: dict):
assert resource.get(Constants.LABEL)
assert resource.get(Constants.RES_TYPE) in Constants.RES_SUPPORTED_TYPES
assert resource.get(Constants.RES_NAME_PREFIX)
creation_details = resource[Constants.RES_CREATION_DETAILS]

# count was set to zero
if not creation_details['in_config_file']:
# TODO HANDLE UNINSTALL OF JANUS ON NODES ...
return

assert resource.get(Constants.RES_COUNT, 1)
assert resource.get(Constants.RES_IMAGE)

self.logger.info(f"Validated:OK Resource={self.name} using {self.label}")

def do_add_resource(self, *, resource: dict):
Expand Down

0 comments on commit 2f97dfd

Please sign in to comment.