Documentation
¶
Overview ¶
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2022 Utkarsh Srivastava <utkarsh@sagacious.dev>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DeleteCmd = &cobra.Command{ Use: "delete", Short: "Delete Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunDelete(name)) }, }
DeleteCmd represents the delete command
var EditCmd = &cobra.Command{ Use: "edit", Short: "Edit Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunEdit(name)) }, }
EditCmd represents the edit command
var ListCmd = &cobra.Command{ Use: "list", Short: "Prints the list of VMs", Deprecated: "This command is deprecated use `kindli vm status -A` instead", Run: func(cmd *cobra.Command, args []string) { vms, err := RunList() utils.ExitIfNotNil(err) fmt.Println(strings.Join(vms, "\n")) }, }
ListCmd represents the list command
var RestartCmd = &cobra.Command{ Use: "restart", Short: "Restart Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunRestart(name)) }, }
RestartCmd represents the restart command
var ShellCmd = &cobra.Command{ Use: "shell", Short: "SSH into the Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunShell(name, args)) }, }
ShellCmd represents the shell command
var StartCmd = &cobra.Command{ Use: "start", Short: "Start a new VM for Kindli", Long: `Start a new VM for Kindli. NOTE: VM will be created using lima`, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if arch != "" && arch != "x86_64" && arch != "aarch64" { return fmt.Errorf("invalid --arch value, can be only \"x86_64\" or \"aarch64\"") } return nil }, Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunStart(name)) }, }
StartCmd represents the start command
var StatusCmd = &cobra.Command{ Use: "status", Short: "Status of Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, _ := cmd.Flags().GetString("vm-name") all, _ := cmd.Flags().GetBool("all") if all { utils.ExitIfNotNil(RunStatus("")) return } utils.ExitIfNotNil(RunStatus(name)) }, }
StatusCmd represents the status command
var StopCmd = &cobra.Command{ Use: "stop", Short: "Stop running Kindli VM", Run: func(cmd *cobra.Command, args []string) { name, err := cmd.Flags().GetString("vm-name") utils.ExitIfNotNil(err) utils.ExitIfNotNil(RunStop(name)) }, }
StopCmd represents the stop command
var VMCmd = &cobra.Command{
Use: "vm",
Short: "Commands for managing lifecycle of kindli virtual machine",
}
VMCmd represents the preq command
Functions ¶
func RunRestart ¶
Types ¶
This section is empty.