diff --git a/octavia-cli/octavia_cli/apply/resources.py b/octavia-cli/octavia_cli/apply/resources.py index 90a7901ab6d3..fb60ec283922 100644 --- a/octavia-cli/octavia_cli/apply/resources.py +++ b/octavia-cli/octavia_cli/apply/resources.py @@ -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 @@ -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"],