What Are the Application Scenarios of Online/Offline Modes?
- Viewing/Switching the current mode
KooCLI can stay in online/offline modes. By default, it is offline. After configuring a profile, you can run hcloud configure list --cli-query=offline to check whether the offline mode is used.
- To switch to offline mode, run the hcloud configure set --cli-offline=true command.
- To switch to online mode, run the hcloud configure set --cli-offline=false command.
- Offline mode scenario
Download the latest offline metadata of KooCLI to a local directory. The metadata cache files have unlimited validity. When you run KooCLI commands, the file content will be read for command verification and parsing. In this mode, local metadata cache files will not be automatically updated, and parameter verification for existing commands will not be affected. This ensures that the built KooCLI commands are always available. Use this mode if you build scripts with KooCLI commands and periodically execute the scripts to manage cloud services and resources.
- Online mode scenario
KooCLI obtains metadata and caches it locally during command execution. The metadata cache files have limited validity. If a file has expired, KooCLI updates it and then uses it for command verification and parsing. In this mode, only the metadata related to your executed commands is saved, and you can call APIs of new cloud services through KooCLI. Use this mode if you need to run any KooCLI commands immediately to manage cloud services and resources.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot