def update_proxy(self, proxy: models.Proxy) -> None:
     self.update_config(proxy=proxy)
     infra_env_update_params = models.InfraEnvUpdateParams(
         proxy=self._config.proxy)
     self.api_client.update_infra_env(
         infra_env_id=self.id,
         infra_env_update_params=infra_env_update_params)
 def update_static_network_config(
         self, static_network_config: List[dict]) -> None:
     self.update_config(static_network_config=static_network_config)
     infra_env_update_params = models.InfraEnvUpdateParams(
         static_network_config=static_network_config)
     self.api_client.update_infra_env(
         infra_env_id=self.id,
         infra_env_update_params=infra_env_update_params)
 def update_infra_env(self, name, overrides={}):
     infra_env_update_params = {}
     infra_env_id = self.get_infra_env_id(name)
     self.set_default_values(overrides, existing=True)
     self.set_default_infraenv_values(overrides)
     infra_env_update_params = {}
     allowed_parameters = self._allowed_parameters(models.InfraEnvUpdateParams)
     for parameter in overrides:
         if parameter in allowed_parameters:
             infra_env_update_params[parameter] = overrides[parameter]
     if infra_env_update_params:
         infra_env_update_params = models.InfraEnvUpdateParams(**infra_env_update_params)
         self.client.update_infra_env(infra_env_id=infra_env_id, infra_env_update_params=infra_env_update_params)
    def _update_static_network(self):
        if not self._config.is_static_ip:
            return

        if self._config.static_network_config is None:
            log.info(
                "No static network configuration found, generating new network configurations"
            )
            static_network_config = static_network.generate_static_network_data_from_tf(
                self.nodes.controller.tf_folder)
            self._config.static_network_config = static_network_config

        log.info(f"Updating InfraEnv {self.id} static network configuration")
        infra_env_update_params = models.InfraEnvUpdateParams(
            static_network_config=self._config.static_network_config)
        self.api_client.update_infra_env(
            infra_env_id=self.id,
            infra_env_update_params=infra_env_update_params)
        log.info(
            f"InfraEnv static network configuration successfully updated {self._config.static_network_config}"
        )
 def patch_discovery_ignition(self, infra_env_id: str,
                              ignition_info: str) -> None:
     infra_env_update_params = models.InfraEnvUpdateParams(
         ignition_config_override=json.dumps(ignition_info))
     self.update_infra_env(infra_env_id=infra_env_id,
                           infra_env_update_params=infra_env_update_params)