Skip to content

Commit

Permalink
🐛 octavia-cli: make schedule field optional (#13028)
Browse files Browse the repository at this point in the history
  • Loading branch information
alafanechere authored May 19, 2022
1 parent e542a4b commit bd07fce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions octavia-cli/octavia_cli/apply/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,8 @@ def _deserialize_raw_configuration(self):
self._check_for_legacy_connection_configuration_keys(configuration)
configuration["sync_catalog"] = self._create_configured_catalog(configuration["sync_catalog"])
configuration["namespace_definition"] = NamespaceDefinitionType(configuration["namespace_definition"])
configuration["schedule"] = ConnectionSchedule(**configuration["schedule"])
if "schedule" in configuration:
configuration["schedule"] = ConnectionSchedule(**configuration["schedule"])
configuration["resource_requirements"] = ResourceRequirements(**configuration["resource_requirements"])
configuration["status"] = ConnectionStatus(configuration["status"])
return configuration
Expand Down Expand Up @@ -587,7 +588,7 @@ def _check_for_legacy_connection_configuration_keys(self, configuration_to_check
self._check_for_invalid_configuration_keys(
configuration_to_check, {"syncCatalog", "namespaceDefinition", "namespaceFormat", "resourceRequirements"}, error_message
)
self._check_for_invalid_configuration_keys(configuration_to_check["schedule"], {"timeUnit"}, error_message)
self._check_for_invalid_configuration_keys(configuration_to_check.get("schedule", {}), {"timeUnit"}, error_message)
for stream in configuration_to_check["sync_catalog"]["streams"]:
self._check_for_invalid_configuration_keys(
stream["stream"],
Expand Down

0 comments on commit bd07fce

Please sign in to comment.