async fn upgrade(mut self, reg: &Region, state: ManifestState) -> Result<Self> {
        assert_eq!(self.state, ManifestState::Base); // sanity
        let v = match state {
            ManifestState::Completed => Vault::regional(&reg.vault)?,
            ManifestState::Stubbed => Vault::mocked(&reg.vault)?,
            _ => bail!("Can only upgrade a Base manifest to Completed or Stubbed"),
        };
        // replace one-off templates in evar strings with values
        // note that this happens before secrets because:
        // secrets may be injected at this step from the Region
        self.template_evars(reg)?;
        // secrets before configs (.j2 template files use raw secret values)
        self.secrets(&v, &reg.vault).await?;

        // templates last
        self.template_configs(reg)?;
        self.state = state;
        Ok(self)
    }
/// Upgrade a `Base` manifest to either a Complete or a Stubbed one
Upgrade a `Base` manifest to either a Complete or a Stubbed one
Upgrade a ` Base ` manifest to either a Complete or a Stubbed one
async fn upgrade(mut self, reg: &Region, state: ManifestState) -> Result<Self> {
        assert_eq!(self.state, ManifestState::Base); // sanity
        let v = match state {
            ManifestState::Completed => Vault::regional(&reg.vault)?,
            ManifestState::Stubbed => Vault::mocked(&reg.vault)?,
            _ => bail!("Can only upgrade a Base manifest to Completed or Stubbed"),
        };
        // replace one-off templates in evar strings with values
        // note that this happens before secrets because:
        // secrets may be injected at this step from the Region
        self.template_evars(reg)?;
        // secrets before configs (.j2 template files use raw secret values)
        self.secrets(&v, &reg.vault).await?;
        // templates last
        self.template_configs(reg)?;
        self.state = state;
        Ok(self)
    }
async fn upgrade ( mut self , reg : & Region , state : ManifestState ) -> Result < Self > { assert_eq ! ( self state ManifestState Base ) ; // sanity let v = match state { ManifestState :: Completed => Vault :: regional ( & reg . vault ) ? , ManifestState :: Stubbed => Vault :: mocked ( & reg . vault ) ? , _ => bail ! ( " " ) , } ; // replace one-off templates in evar strings with values // note that this happens before secrets because: // secrets may be injected at this step from the Region self . template_evars ( reg ) ? ; // secrets before configs (.j2 template files use raw secret values) self . secrets ( & v , & reg . vault ) . await ? ; // templates last self . template_configs ( reg ) ? ; self . state = state ; Ok ( self ) }
Upgrade a `Base` manifest to either a Complete or a Stubbed one
Upgrade a ` Base ` manifest to either a Complete or a Stubbed one
mut self
reg
&Region
state
ManifestState
mut self
reg
&Region
state
ManifestState