MCPcopy Create free account
hub / github.com/NVIDIA/nvcf / SaveStateForCurrentCommand

Function SaveStateForCurrentCommand

src/clis/nvcf-cli/cmd/root.go:183–194  ·  view source on GitHub ↗

SaveStateForCurrentCommand saves state using the current config context

()

Source from the content-addressed store, hash-verified

181
182// SaveStateForCurrentCommand saves state using the current config context
183func SaveStateForCurrentCommand() error {
184 sm := GetStateManagerForCurrentCommand()
185 configFile := activeConfigFileForState()
186
187 // Update config file path in state when a config file is active.
188 if configFile != "" {
189 currentState := sm.GetState()
190 sm.SetConfig(configFile, currentState.KubeconfigPath, currentState.ClusterMode)
191 }
192
193 return sm.Save()
194}
195
196// GetCurrentState returns the state for the current config context
197func GetCurrentState() *state.State {

Callers 11

runCreateFunction · 0.85
runDeleteFunction · 0.85
runRefreshFunction · 0.85
runInitFunction · 0.85
runAPIKeyGenerateFunction · 0.85
runClearAPIKeyFunction · 0.85
runClearAllAPIKeysFunction · 0.85
runTaskCreateFunction · 0.85
runTaskDeleteFunction · 0.85

Calls 5

activeConfigFileForStateFunction · 0.85
SaveMethod · 0.80
GetStateMethod · 0.45
SetConfigMethod · 0.45