pvectl 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.claude/rules/branch-before-changes.md +52 -0
- data/.claude/rules/documentation-updates.md +104 -0
- data/.claude/rules/git-workflow.md +84 -0
- data/.claude/rules/proxmox-api-docs.md +58 -0
- data/.claude/rules/rbs-signatures.md +80 -0
- data/.claude/rules/refactoring-as-design-option.md +35 -0
- data/.claude/scheduled_tasks.lock +1 -0
- data/.claude/settings.json +51 -0
- data/.mcp.json +8 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +138 -0
- data/CLAUDE.md +211 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.md +143 -0
- data/Rakefile +8 -0
- data/docs/proxmox-api-update.sh +96 -0
- data/exe/pvectl +5 -0
- data/lib/pvectl/argv_preprocessor.rb +334 -0
- data/lib/pvectl/cli.rb +102 -0
- data/lib/pvectl/commands/apt.rb +389 -0
- data/lib/pvectl/commands/clone_container.rb +230 -0
- data/lib/pvectl/commands/clone_vm.rb +331 -0
- data/lib/pvectl/commands/cloudinit/command.rb +122 -0
- data/lib/pvectl/commands/cloudinit/dump.rb +94 -0
- data/lib/pvectl/commands/cloudinit/pending.rb +137 -0
- data/lib/pvectl/commands/cloudinit/regenerate.rb +79 -0
- data/lib/pvectl/commands/config/command.rb +65 -0
- data/lib/pvectl/commands/config/get_contexts.rb +68 -0
- data/lib/pvectl/commands/config/set_cluster.rb +103 -0
- data/lib/pvectl/commands/config/set_context.rb +136 -0
- data/lib/pvectl/commands/config/set_credentials.rb +181 -0
- data/lib/pvectl/commands/config/use_context.rb +69 -0
- data/lib/pvectl/commands/config/view.rb +67 -0
- data/lib/pvectl/commands/console.rb +93 -0
- data/lib/pvectl/commands/console_ct.rb +187 -0
- data/lib/pvectl/commands/console_vm.rb +187 -0
- data/lib/pvectl/commands/container_lifecycle_command.rb +77 -0
- data/lib/pvectl/commands/create_backup.rb +173 -0
- data/lib/pvectl/commands/create_container.rb +141 -0
- data/lib/pvectl/commands/create_resource_command.rb +244 -0
- data/lib/pvectl/commands/create_snapshot.rb +242 -0
- data/lib/pvectl/commands/create_vm.rb +267 -0
- data/lib/pvectl/commands/delete_backup.rb +139 -0
- data/lib/pvectl/commands/delete_command.rb +119 -0
- data/lib/pvectl/commands/delete_container.rb +30 -0
- data/lib/pvectl/commands/delete_snapshot.rb +248 -0
- data/lib/pvectl/commands/delete_vm.rb +127 -0
- data/lib/pvectl/commands/describe/command.rb +251 -0
- data/lib/pvectl/commands/edit_container.rb +56 -0
- data/lib/pvectl/commands/edit_dns.rb +149 -0
- data/lib/pvectl/commands/edit_hosts.rb +135 -0
- data/lib/pvectl/commands/edit_node.rb +54 -0
- data/lib/pvectl/commands/edit_resource_command.rb +180 -0
- data/lib/pvectl/commands/edit_vm.rb +154 -0
- data/lib/pvectl/commands/edit_volume.rb +189 -0
- data/lib/pvectl/commands/feature_command.rb +230 -0
- data/lib/pvectl/commands/feature_container.rb +21 -0
- data/lib/pvectl/commands/feature_vm.rb +94 -0
- data/lib/pvectl/commands/get/command.rb +360 -0
- data/lib/pvectl/commands/get/handlers/backups.rb +76 -0
- data/lib/pvectl/commands/get/handlers/capabilities.rb +107 -0
- data/lib/pvectl/commands/get/handlers/containers.rb +148 -0
- data/lib/pvectl/commands/get/handlers/disks.rb +107 -0
- data/lib/pvectl/commands/get/handlers/dns.rb +94 -0
- data/lib/pvectl/commands/get/handlers/hosts.rb +94 -0
- data/lib/pvectl/commands/get/handlers/nodes.rb +162 -0
- data/lib/pvectl/commands/get/handlers/services.rb +81 -0
- data/lib/pvectl/commands/get/handlers/snapshots.rb +97 -0
- data/lib/pvectl/commands/get/handlers/storage.rb +118 -0
- data/lib/pvectl/commands/get/handlers/subscription.rb +69 -0
- data/lib/pvectl/commands/get/handlers/tasks.rb +89 -0
- data/lib/pvectl/commands/get/handlers/templates.rb +175 -0
- data/lib/pvectl/commands/get/handlers/time.rb +118 -0
- data/lib/pvectl/commands/get/handlers/vms.rb +145 -0
- data/lib/pvectl/commands/get/handlers/volume.rb +134 -0
- data/lib/pvectl/commands/get/resource_handler.rb +63 -0
- data/lib/pvectl/commands/get/resource_registry.rb +18 -0
- data/lib/pvectl/commands/get/watch_loop.rb +129 -0
- data/lib/pvectl/commands/irreversible_command.rb +265 -0
- data/lib/pvectl/commands/logs/command.rb +275 -0
- data/lib/pvectl/commands/logs/handlers/journal.rb +46 -0
- data/lib/pvectl/commands/logs/handlers/syslog.rb +53 -0
- data/lib/pvectl/commands/logs/handlers/task_detail.rb +52 -0
- data/lib/pvectl/commands/logs/handlers/task_logs.rb +115 -0
- data/lib/pvectl/commands/logs/resource_handler.rb +46 -0
- data/lib/pvectl/commands/logs/resource_registry.rb +22 -0
- data/lib/pvectl/commands/migrate_command.rb +282 -0
- data/lib/pvectl/commands/migrate_container.rb +23 -0
- data/lib/pvectl/commands/migrate_vm.rb +122 -0
- data/lib/pvectl/commands/move_disk_command.rb +239 -0
- data/lib/pvectl/commands/move_disk_container.rb +21 -0
- data/lib/pvectl/commands/move_disk_vm.rb +127 -0
- data/lib/pvectl/commands/ping.rb +249 -0
- data/lib/pvectl/commands/pull.rb +342 -0
- data/lib/pvectl/commands/push.rb +352 -0
- data/lib/pvectl/commands/reset.rb +64 -0
- data/lib/pvectl/commands/resource_lifecycle_command.rb +277 -0
- data/lib/pvectl/commands/resource_registry.rb +73 -0
- data/lib/pvectl/commands/restart.rb +70 -0
- data/lib/pvectl/commands/restart_container.rb +18 -0
- data/lib/pvectl/commands/restore_backup.rb +236 -0
- data/lib/pvectl/commands/resume.rb +57 -0
- data/lib/pvectl/commands/rollback_snapshot.rb +228 -0
- data/lib/pvectl/commands/sendkey_vm.rb +205 -0
- data/lib/pvectl/commands/service.rb +293 -0
- data/lib/pvectl/commands/set_container.rb +50 -0
- data/lib/pvectl/commands/set_node.rb +52 -0
- data/lib/pvectl/commands/set_resource_command.rb +185 -0
- data/lib/pvectl/commands/set_vm.rb +136 -0
- data/lib/pvectl/commands/set_volume.rb +212 -0
- data/lib/pvectl/commands/shared_config_parsers.rb +126 -0
- data/lib/pvectl/commands/shared_flags.rb +155 -0
- data/lib/pvectl/commands/shutdown.rb +73 -0
- data/lib/pvectl/commands/shutdown_container.rb +18 -0
- data/lib/pvectl/commands/start.rb +79 -0
- data/lib/pvectl/commands/start_container.rb +18 -0
- data/lib/pvectl/commands/stop.rb +75 -0
- data/lib/pvectl/commands/stop_container.rb +18 -0
- data/lib/pvectl/commands/suspend.rb +64 -0
- data/lib/pvectl/commands/template_command.rb +205 -0
- data/lib/pvectl/commands/template_container.rb +27 -0
- data/lib/pvectl/commands/template_vm.rb +106 -0
- data/lib/pvectl/commands/top/command.rb +206 -0
- data/lib/pvectl/commands/top/handlers/containers.rb +61 -0
- data/lib/pvectl/commands/top/handlers/nodes.rb +61 -0
- data/lib/pvectl/commands/top/handlers/vms.rb +61 -0
- data/lib/pvectl/commands/top/resource_handler.rb +46 -0
- data/lib/pvectl/commands/top/resource_registry.rb +22 -0
- data/lib/pvectl/commands/unlink_disk_vm.rb +232 -0
- data/lib/pvectl/commands/vm_lifecycle_command.rb +77 -0
- data/lib/pvectl/commands/wakeonlan_node.rb +153 -0
- data/lib/pvectl/config/errors.rb +62 -0
- data/lib/pvectl/config/models/cluster.rb +180 -0
- data/lib/pvectl/config/models/context.rb +100 -0
- data/lib/pvectl/config/models/resolved_config.rb +171 -0
- data/lib/pvectl/config/models/user.rb +133 -0
- data/lib/pvectl/config/provider.rb +297 -0
- data/lib/pvectl/config/service.rb +300 -0
- data/lib/pvectl/config/store.rb +161 -0
- data/lib/pvectl/config/wizard.rb +309 -0
- data/lib/pvectl/config_serializer.rb +1034 -0
- data/lib/pvectl/connection/retry_handler.rb +161 -0
- data/lib/pvectl/connection.rb +157 -0
- data/lib/pvectl/console/terminal_session.rb +449 -0
- data/lib/pvectl/editor_session.rb +157 -0
- data/lib/pvectl/exit_codes.rb +43 -0
- data/lib/pvectl/formatters/base.rb +55 -0
- data/lib/pvectl/formatters/color_support.rb +90 -0
- data/lib/pvectl/formatters/json.rb +45 -0
- data/lib/pvectl/formatters/output_helper.rb +77 -0
- data/lib/pvectl/formatters/registry.rb +72 -0
- data/lib/pvectl/formatters/table.rb +235 -0
- data/lib/pvectl/formatters/wide.rb +93 -0
- data/lib/pvectl/formatters/yaml.rb +49 -0
- data/lib/pvectl/manifest_serializer.rb +142 -0
- data/lib/pvectl/models/apt_package.rb +107 -0
- data/lib/pvectl/models/backup.rb +173 -0
- data/lib/pvectl/models/base.rb +49 -0
- data/lib/pvectl/models/capability.rb +62 -0
- data/lib/pvectl/models/container.rb +205 -0
- data/lib/pvectl/models/container_operation_result.rb +27 -0
- data/lib/pvectl/models/dns_config.rb +54 -0
- data/lib/pvectl/models/hosts_file.rb +47 -0
- data/lib/pvectl/models/journal_entry.rb +16 -0
- data/lib/pvectl/models/network_interface.rb +85 -0
- data/lib/pvectl/models/node.rb +195 -0
- data/lib/pvectl/models/node_operation_result.rb +45 -0
- data/lib/pvectl/models/operation_result.rb +110 -0
- data/lib/pvectl/models/physical_disk.rb +193 -0
- data/lib/pvectl/models/service.rb +80 -0
- data/lib/pvectl/models/snapshot.rb +101 -0
- data/lib/pvectl/models/snapshot_description.rb +39 -0
- data/lib/pvectl/models/storage.rb +180 -0
- data/lib/pvectl/models/subscription.rb +87 -0
- data/lib/pvectl/models/syslog_entry.rb +17 -0
- data/lib/pvectl/models/task.rb +95 -0
- data/lib/pvectl/models/task_entry.rb +52 -0
- data/lib/pvectl/models/task_log_line.rb +17 -0
- data/lib/pvectl/models/time_config.rb +47 -0
- data/lib/pvectl/models/vm.rb +137 -0
- data/lib/pvectl/models/vm_operation_result.rb +27 -0
- data/lib/pvectl/models/volume.rb +133 -0
- data/lib/pvectl/models/volume_operation_result.rb +26 -0
- data/lib/pvectl/parsers/cloud_init_config.rb +92 -0
- data/lib/pvectl/parsers/disk_config.rb +97 -0
- data/lib/pvectl/parsers/lxc_mount_config.rb +98 -0
- data/lib/pvectl/parsers/lxc_net_config.rb +97 -0
- data/lib/pvectl/parsers/net_config.rb +95 -0
- data/lib/pvectl/parsers/smart_text.rb +42 -0
- data/lib/pvectl/plugin_loader.rb +157 -0
- data/lib/pvectl/presenters/apt_package.rb +99 -0
- data/lib/pvectl/presenters/backup.rb +128 -0
- data/lib/pvectl/presenters/base.rb +283 -0
- data/lib/pvectl/presenters/capability.rb +104 -0
- data/lib/pvectl/presenters/config/context.rb +80 -0
- data/lib/pvectl/presenters/container.rb +574 -0
- data/lib/pvectl/presenters/container_operation_result.rb +109 -0
- data/lib/pvectl/presenters/disk.rb +184 -0
- data/lib/pvectl/presenters/dns_config.rb +68 -0
- data/lib/pvectl/presenters/hosts_file.rb +61 -0
- data/lib/pvectl/presenters/journal_entry.rb +20 -0
- data/lib/pvectl/presenters/node.rb +762 -0
- data/lib/pvectl/presenters/node_operation_result.rb +50 -0
- data/lib/pvectl/presenters/operation_result.rb +61 -0
- data/lib/pvectl/presenters/service.rb +76 -0
- data/lib/pvectl/presenters/snapshot.rb +239 -0
- data/lib/pvectl/presenters/snapshot_operation_result.rb +125 -0
- data/lib/pvectl/presenters/storage.rb +329 -0
- data/lib/pvectl/presenters/subscription.rb +189 -0
- data/lib/pvectl/presenters/syslog_entry.rb +20 -0
- data/lib/pvectl/presenters/task_entry.rb +69 -0
- data/lib/pvectl/presenters/task_log_line.rb +20 -0
- data/lib/pvectl/presenters/template.rb +76 -0
- data/lib/pvectl/presenters/time_config.rb +86 -0
- data/lib/pvectl/presenters/top_container.rb +112 -0
- data/lib/pvectl/presenters/top_node.rb +115 -0
- data/lib/pvectl/presenters/top_presenter.rb +59 -0
- data/lib/pvectl/presenters/top_vm.rb +105 -0
- data/lib/pvectl/presenters/vm.rb +853 -0
- data/lib/pvectl/presenters/vm_operation_result.rb +109 -0
- data/lib/pvectl/presenters/volume.rb +136 -0
- data/lib/pvectl/presenters/volume_operation_result.rb +58 -0
- data/lib/pvectl/repositories/apt.rb +93 -0
- data/lib/pvectl/repositories/backup.rb +186 -0
- data/lib/pvectl/repositories/base.rb +110 -0
- data/lib/pvectl/repositories/capabilities.rb +96 -0
- data/lib/pvectl/repositories/container.rb +503 -0
- data/lib/pvectl/repositories/disk.rb +87 -0
- data/lib/pvectl/repositories/dns.rb +54 -0
- data/lib/pvectl/repositories/hosts.rb +63 -0
- data/lib/pvectl/repositories/journal.rb +23 -0
- data/lib/pvectl/repositories/node.rb +537 -0
- data/lib/pvectl/repositories/service.rb +139 -0
- data/lib/pvectl/repositories/snapshot.rb +133 -0
- data/lib/pvectl/repositories/storage.rb +302 -0
- data/lib/pvectl/repositories/subscription.rb +77 -0
- data/lib/pvectl/repositories/syslog.rb +25 -0
- data/lib/pvectl/repositories/task.rb +82 -0
- data/lib/pvectl/repositories/task_list.rb +30 -0
- data/lib/pvectl/repositories/task_log.rb +31 -0
- data/lib/pvectl/repositories/time_config.rb +53 -0
- data/lib/pvectl/repositories/vm.rb +616 -0
- data/lib/pvectl/repositories/volume.rb +306 -0
- data/lib/pvectl/selectors/base.rb +201 -0
- data/lib/pvectl/selectors/container.rb +116 -0
- data/lib/pvectl/selectors/disk.rb +59 -0
- data/lib/pvectl/selectors/vm.rb +116 -0
- data/lib/pvectl/selectors/volume.rb +59 -0
- data/lib/pvectl/services/backup.rb +209 -0
- data/lib/pvectl/services/clone_container.rb +260 -0
- data/lib/pvectl/services/clone_vm.rb +265 -0
- data/lib/pvectl/services/cloudinit.rb +96 -0
- data/lib/pvectl/services/console.rb +152 -0
- data/lib/pvectl/services/container_lifecycle.rb +124 -0
- data/lib/pvectl/services/create_container.rb +179 -0
- data/lib/pvectl/services/create_vm.rb +191 -0
- data/lib/pvectl/services/edit_container.rb +125 -0
- data/lib/pvectl/services/edit_dns.rb +159 -0
- data/lib/pvectl/services/edit_hosts.rb +78 -0
- data/lib/pvectl/services/edit_node.rb +147 -0
- data/lib/pvectl/services/edit_vm.rb +125 -0
- data/lib/pvectl/services/edit_volume.rb +224 -0
- data/lib/pvectl/services/get/resource_service.rb +98 -0
- data/lib/pvectl/services/move_disk.rb +132 -0
- data/lib/pvectl/services/pull_config.rb +94 -0
- data/lib/pvectl/services/push_config.rb +524 -0
- data/lib/pvectl/services/resize_volume.rb +253 -0
- data/lib/pvectl/services/resource_delete.rb +169 -0
- data/lib/pvectl/services/resource_migration.rb +170 -0
- data/lib/pvectl/services/sendkey.rb +108 -0
- data/lib/pvectl/services/service_lifecycle.rb +89 -0
- data/lib/pvectl/services/set_container.rb +128 -0
- data/lib/pvectl/services/set_node.rb +236 -0
- data/lib/pvectl/services/set_vm.rb +128 -0
- data/lib/pvectl/services/set_volume.rb +126 -0
- data/lib/pvectl/services/snapshot.rb +261 -0
- data/lib/pvectl/services/task_listing.rb +75 -0
- data/lib/pvectl/services/unlink_disk.rb +86 -0
- data/lib/pvectl/services/vm_lifecycle.rb +124 -0
- data/lib/pvectl/services/wakeonlan.rb +79 -0
- data/lib/pvectl/utils/resource_resolver.rb +80 -0
- data/lib/pvectl/version.rb +13 -0
- data/lib/pvectl/wizards/create_container.rb +105 -0
- data/lib/pvectl/wizards/create_vm.rb +98 -0
- data/lib/pvectl.rb +439 -0
- data/sig/external/gli.rbs +16 -0
- data/sig/external/proxmox_api.rbs +10 -0
- data/sig/pvectl/argv_preprocessor.rbs +53 -0
- data/sig/pvectl/cli.rbs +26 -0
- data/sig/pvectl/commands/apt.rbs +47 -0
- data/sig/pvectl/commands/clone_container.rbs +31 -0
- data/sig/pvectl/commands/clone_vm.rbs +33 -0
- data/sig/pvectl/commands/cloudinit/command.rbs +13 -0
- data/sig/pvectl/commands/cloudinit/dump.rbs +13 -0
- data/sig/pvectl/commands/cloudinit/pending.rbs +17 -0
- data/sig/pvectl/commands/cloudinit/regenerate.rbs +11 -0
- data/sig/pvectl/commands/config/command.rbs +9 -0
- data/sig/pvectl/commands/config/get_contexts.rbs +11 -0
- data/sig/pvectl/commands/config/set_cluster.rbs +11 -0
- data/sig/pvectl/commands/config/set_context.rbs +15 -0
- data/sig/pvectl/commands/config/set_credentials.rbs +15 -0
- data/sig/pvectl/commands/config/use_context.rbs +11 -0
- data/sig/pvectl/commands/config/view.rbs +11 -0
- data/sig/pvectl/commands/console.rbs +9 -0
- data/sig/pvectl/commands/console_ct.rbs +27 -0
- data/sig/pvectl/commands/console_vm.rbs +27 -0
- data/sig/pvectl/commands/container_lifecycle_command.rbs +25 -0
- data/sig/pvectl/commands/create_backup.rbs +29 -0
- data/sig/pvectl/commands/create_container.rbs +30 -0
- data/sig/pvectl/commands/create_resource_command.rbs +53 -0
- data/sig/pvectl/commands/create_snapshot.rbs +35 -0
- data/sig/pvectl/commands/create_vm.rbs +30 -0
- data/sig/pvectl/commands/delete_backup.rbs +25 -0
- data/sig/pvectl/commands/delete_command.rbs +45 -0
- data/sig/pvectl/commands/delete_container.rbs +11 -0
- data/sig/pvectl/commands/delete_snapshot.rbs +35 -0
- data/sig/pvectl/commands/delete_vm.rbs +13 -0
- data/sig/pvectl/commands/describe/command.rbs +27 -0
- data/sig/pvectl/commands/edit_container.rbs +17 -0
- data/sig/pvectl/commands/edit_dns.rbs +25 -0
- data/sig/pvectl/commands/edit_hosts.rbs +23 -0
- data/sig/pvectl/commands/edit_node.rbs +17 -0
- data/sig/pvectl/commands/edit_resource_command.rbs +35 -0
- data/sig/pvectl/commands/edit_vm.rbs +19 -0
- data/sig/pvectl/commands/edit_volume.rbs +24 -0
- data/sig/pvectl/commands/feature_command.rbs +43 -0
- data/sig/pvectl/commands/feature_container.rbs +10 -0
- data/sig/pvectl/commands/feature_vm.rbs +12 -0
- data/sig/pvectl/commands/get/command.rbs +42 -0
- data/sig/pvectl/commands/get/handlers/backups.rbs +23 -0
- data/sig/pvectl/commands/get/handlers/capabilities.rbs +29 -0
- data/sig/pvectl/commands/get/handlers/containers.rbs +35 -0
- data/sig/pvectl/commands/get/handlers/disks.rbs +27 -0
- data/sig/pvectl/commands/get/handlers/dns.rbs +25 -0
- data/sig/pvectl/commands/get/handlers/hosts.rbs +25 -0
- data/sig/pvectl/commands/get/handlers/nodes.rbs +33 -0
- data/sig/pvectl/commands/get/handlers/services.rbs +23 -0
- data/sig/pvectl/commands/get/handlers/snapshots.rbs +27 -0
- data/sig/pvectl/commands/get/handlers/storage.rbs +25 -0
- data/sig/pvectl/commands/get/handlers/subscription.rbs +25 -0
- data/sig/pvectl/commands/get/handlers/tasks.rbs +28 -0
- data/sig/pvectl/commands/get/handlers/templates.rbs +35 -0
- data/sig/pvectl/commands/get/handlers/time.rbs +29 -0
- data/sig/pvectl/commands/get/handlers/vms.rbs +35 -0
- data/sig/pvectl/commands/get/handlers/volume.rbs +27 -0
- data/sig/pvectl/commands/get/resource_handler.rbs +13 -0
- data/sig/pvectl/commands/get/resource_registry.rbs +8 -0
- data/sig/pvectl/commands/get/watch_loop.rbs +33 -0
- data/sig/pvectl/commands/irreversible_command.rbs +32 -0
- data/sig/pvectl/commands/logs/command.rbs +35 -0
- data/sig/pvectl/commands/logs/handlers/journal.rbs +21 -0
- data/sig/pvectl/commands/logs/handlers/syslog.rbs +21 -0
- data/sig/pvectl/commands/logs/handlers/task_detail.rbs +21 -0
- data/sig/pvectl/commands/logs/handlers/task_logs.rbs +35 -0
- data/sig/pvectl/commands/logs/resource_handler.rbs +11 -0
- data/sig/pvectl/commands/logs/resource_registry.rbs +8 -0
- data/sig/pvectl/commands/migrate_command.rbs +45 -0
- data/sig/pvectl/commands/migrate_container.rbs +11 -0
- data/sig/pvectl/commands/migrate_vm.rbs +13 -0
- data/sig/pvectl/commands/move_disk_command.rbs +43 -0
- data/sig/pvectl/commands/move_disk_container.rbs +11 -0
- data/sig/pvectl/commands/move_disk_vm.rbs +13 -0
- data/sig/pvectl/commands/ping.rbs +39 -0
- data/sig/pvectl/commands/pull.rbs +33 -0
- data/sig/pvectl/commands/push.rbs +32 -0
- data/sig/pvectl/commands/reset.rbs +11 -0
- data/sig/pvectl/commands/resource_lifecycle_command.rbs +55 -0
- data/sig/pvectl/commands/resource_registry.rbs +19 -0
- data/sig/pvectl/commands/restart.rbs +11 -0
- data/sig/pvectl/commands/restart_container.rbs +9 -0
- data/sig/pvectl/commands/restore_backup.rbs +27 -0
- data/sig/pvectl/commands/resume.rbs +11 -0
- data/sig/pvectl/commands/rollback_snapshot.rbs +31 -0
- data/sig/pvectl/commands/sendkey_vm.rbs +25 -0
- data/sig/pvectl/commands/service.rbs +38 -0
- data/sig/pvectl/commands/set_container.rbs +13 -0
- data/sig/pvectl/commands/set_node.rbs +13 -0
- data/sig/pvectl/commands/set_resource_command.rbs +25 -0
- data/sig/pvectl/commands/set_vm.rbs +15 -0
- data/sig/pvectl/commands/set_volume.rbs +24 -0
- data/sig/pvectl/commands/shared_config_parsers.rbs +19 -0
- data/sig/pvectl/commands/shared_flags.rbs +10 -0
- data/sig/pvectl/commands/shutdown.rbs +11 -0
- data/sig/pvectl/commands/shutdown_container.rbs +9 -0
- data/sig/pvectl/commands/start.rbs +11 -0
- data/sig/pvectl/commands/start_container.rbs +9 -0
- data/sig/pvectl/commands/stop.rbs +11 -0
- data/sig/pvectl/commands/stop_container.rbs +9 -0
- data/sig/pvectl/commands/suspend.rbs +11 -0
- data/sig/pvectl/commands/template_command.rbs +21 -0
- data/sig/pvectl/commands/template_container.rbs +10 -0
- data/sig/pvectl/commands/template_vm.rbs +12 -0
- data/sig/pvectl/commands/top/command.rbs +31 -0
- data/sig/pvectl/commands/top/handlers/containers.rbs +21 -0
- data/sig/pvectl/commands/top/handlers/nodes.rbs +21 -0
- data/sig/pvectl/commands/top/handlers/vms.rbs +21 -0
- data/sig/pvectl/commands/top/resource_handler.rbs +11 -0
- data/sig/pvectl/commands/top/resource_registry.rbs +8 -0
- data/sig/pvectl/commands/unlink_disk_vm.rbs +27 -0
- data/sig/pvectl/commands/vm_lifecycle_command.rbs +25 -0
- data/sig/pvectl/commands/wakeonlan_node.rbs +21 -0
- data/sig/pvectl/config/errors.rbs +24 -0
- data/sig/pvectl/config/models/cluster.rbs +39 -0
- data/sig/pvectl/config/models/context.rbs +23 -0
- data/sig/pvectl/config/models/resolved_config.rbs +51 -0
- data/sig/pvectl/config/models/user.rbs +31 -0
- data/sig/pvectl/config/provider.rbs +40 -0
- data/sig/pvectl/config/service.rbs +65 -0
- data/sig/pvectl/config/store.rbs +14 -0
- data/sig/pvectl/config/wizard.rbs +48 -0
- data/sig/pvectl/config_serializer.rbs +121 -0
- data/sig/pvectl/connection/retry_handler.rbs +31 -0
- data/sig/pvectl/connection.rbs +35 -0
- data/sig/pvectl/console/terminal_session.rbs +63 -0
- data/sig/pvectl/editor_session.rbs +33 -0
- data/sig/pvectl/exit_codes.rbs +19 -0
- data/sig/pvectl/formatters/base.rbs +13 -0
- data/sig/pvectl/formatters/color_support.rbs +13 -0
- data/sig/pvectl/formatters/json.rbs +7 -0
- data/sig/pvectl/formatters/output_helper.rbs +9 -0
- data/sig/pvectl/formatters/registry.rbs +13 -0
- data/sig/pvectl/formatters/table.rbs +25 -0
- data/sig/pvectl/formatters/wide.rbs +15 -0
- data/sig/pvectl/formatters/yaml.rbs +7 -0
- data/sig/pvectl/manifest_serializer.rbs +18 -0
- data/sig/pvectl/models/apt_package.rbs +26 -0
- data/sig/pvectl/models/backup.rbs +31 -0
- data/sig/pvectl/models/base.rbs +11 -0
- data/sig/pvectl/models/capability.rbs +16 -0
- data/sig/pvectl/models/container.rbs +44 -0
- data/sig/pvectl/models/container_operation_result.rbs +9 -0
- data/sig/pvectl/models/dns_config.rbs +15 -0
- data/sig/pvectl/models/hosts_file.rbs +13 -0
- data/sig/pvectl/models/journal_entry.rbs +10 -0
- data/sig/pvectl/models/network_interface.rbs +20 -0
- data/sig/pvectl/models/node.rbs +47 -0
- data/sig/pvectl/models/node_operation_result.rbs +12 -0
- data/sig/pvectl/models/operation_result.rbs +21 -0
- data/sig/pvectl/models/physical_disk.rbs +35 -0
- data/sig/pvectl/models/service.rbs +18 -0
- data/sig/pvectl/models/snapshot.rbs +21 -0
- data/sig/pvectl/models/snapshot_description.rbs +18 -0
- data/sig/pvectl/models/storage.rbs +39 -0
- data/sig/pvectl/models/subscription.rbs +24 -0
- data/sig/pvectl/models/syslog_entry.rbs +10 -0
- data/sig/pvectl/models/task.rbs +22 -0
- data/sig/pvectl/models/task_entry.rbs +24 -0
- data/sig/pvectl/models/task_log_line.rbs +10 -0
- data/sig/pvectl/models/time_config.rbs +12 -0
- data/sig/pvectl/models/vm.rbs +32 -0
- data/sig/pvectl/models/vm_operation_result.rbs +9 -0
- data/sig/pvectl/models/volume.rbs +29 -0
- data/sig/pvectl/models/volume_operation_result.rbs +9 -0
- data/sig/pvectl/parsers/cloud_init_config.rbs +15 -0
- data/sig/pvectl/parsers/disk_config.rbs +19 -0
- data/sig/pvectl/parsers/lxc_mount_config.rbs +19 -0
- data/sig/pvectl/parsers/lxc_net_config.rbs +19 -0
- data/sig/pvectl/parsers/net_config.rbs +19 -0
- data/sig/pvectl/parsers/smart_text.rbs +7 -0
- data/sig/pvectl/plugin_loader.rbs +25 -0
- data/sig/pvectl/presenters/apt_package.rbs +19 -0
- data/sig/pvectl/presenters/backup.rbs +25 -0
- data/sig/pvectl/presenters/base.rbs +41 -0
- data/sig/pvectl/presenters/capability.rbs +19 -0
- data/sig/pvectl/presenters/config/context.rbs +17 -0
- data/sig/pvectl/presenters/container.rbs +78 -0
- data/sig/pvectl/presenters/container_operation_result.rbs +19 -0
- data/sig/pvectl/presenters/disk.rbs +31 -0
- data/sig/pvectl/presenters/dns_config.rbs +13 -0
- data/sig/pvectl/presenters/hosts_file.rbs +13 -0
- data/sig/pvectl/presenters/journal_entry.rbs +11 -0
- data/sig/pvectl/presenters/node.rbs +118 -0
- data/sig/pvectl/presenters/node_operation_result.rbs +11 -0
- data/sig/pvectl/presenters/operation_result.rbs +17 -0
- data/sig/pvectl/presenters/service.rbs +15 -0
- data/sig/pvectl/presenters/snapshot.rbs +35 -0
- data/sig/pvectl/presenters/snapshot_operation_result.rbs +27 -0
- data/sig/pvectl/presenters/storage.rbs +59 -0
- data/sig/pvectl/presenters/subscription.rbs +36 -0
- data/sig/pvectl/presenters/syslog_entry.rbs +11 -0
- data/sig/pvectl/presenters/task_entry.rbs +21 -0
- data/sig/pvectl/presenters/task_log_line.rbs +11 -0
- data/sig/pvectl/presenters/template.rbs +15 -0
- data/sig/pvectl/presenters/time_config.rbs +19 -0
- data/sig/pvectl/presenters/top_container.rbs +17 -0
- data/sig/pvectl/presenters/top_node.rbs +17 -0
- data/sig/pvectl/presenters/top_presenter.rbs +13 -0
- data/sig/pvectl/presenters/top_vm.rbs +17 -0
- data/sig/pvectl/presenters/vm.rbs +91 -0
- data/sig/pvectl/presenters/vm_operation_result.rbs +19 -0
- data/sig/pvectl/presenters/volume.rbs +23 -0
- data/sig/pvectl/presenters/volume_operation_result.rbs +11 -0
- data/sig/pvectl/repositories/apt.rbs +17 -0
- data/sig/pvectl/repositories/backup.rbs +27 -0
- data/sig/pvectl/repositories/base.rbs +23 -0
- data/sig/pvectl/repositories/capabilities.rbs +20 -0
- data/sig/pvectl/repositories/container.rbs +63 -0
- data/sig/pvectl/repositories/disk.rbs +17 -0
- data/sig/pvectl/repositories/dns.rbs +13 -0
- data/sig/pvectl/repositories/hosts.rbs +13 -0
- data/sig/pvectl/repositories/journal.rbs +7 -0
- data/sig/pvectl/repositories/node.rbs +68 -0
- data/sig/pvectl/repositories/service.rbs +27 -0
- data/sig/pvectl/repositories/snapshot.rbs +19 -0
- data/sig/pvectl/repositories/storage.rbs +37 -0
- data/sig/pvectl/repositories/subscription.rbs +17 -0
- data/sig/pvectl/repositories/syslog.rbs +7 -0
- data/sig/pvectl/repositories/task.rbs +19 -0
- data/sig/pvectl/repositories/task_list.rbs +7 -0
- data/sig/pvectl/repositories/task_log.rbs +11 -0
- data/sig/pvectl/repositories/time_config.rbs +13 -0
- data/sig/pvectl/repositories/vm.rbs +85 -0
- data/sig/pvectl/repositories/volume.rbs +43 -0
- data/sig/pvectl/selectors/base.rbs +37 -0
- data/sig/pvectl/selectors/container.rbs +19 -0
- data/sig/pvectl/selectors/disk.rbs +13 -0
- data/sig/pvectl/selectors/vm.rbs +19 -0
- data/sig/pvectl/selectors/volume.rbs +13 -0
- data/sig/pvectl/services/backup.rbs +27 -0
- data/sig/pvectl/services/clone_container.rbs +35 -0
- data/sig/pvectl/services/clone_vm.rbs +35 -0
- data/sig/pvectl/services/cloudinit.rbs +19 -0
- data/sig/pvectl/services/console.rbs +23 -0
- data/sig/pvectl/services/container_lifecycle.rbs +26 -0
- data/sig/pvectl/services/create_container.rbs +64 -0
- data/sig/pvectl/services/create_vm.rbs +72 -0
- data/sig/pvectl/services/edit_container.rbs +17 -0
- data/sig/pvectl/services/edit_dns.rbs +23 -0
- data/sig/pvectl/services/edit_hosts.rbs +13 -0
- data/sig/pvectl/services/edit_node.rbs +21 -0
- data/sig/pvectl/services/edit_vm.rbs +17 -0
- data/sig/pvectl/services/edit_volume.rbs +18 -0
- data/sig/pvectl/services/get/resource_service.rbs +23 -0
- data/sig/pvectl/services/move_disk.rbs +21 -0
- data/sig/pvectl/services/pull_config.rbs +18 -0
- data/sig/pvectl/services/push_config.rbs +37 -0
- data/sig/pvectl/services/resize_volume.rbs +47 -0
- data/sig/pvectl/services/resource_delete.rbs +27 -0
- data/sig/pvectl/services/resource_migration.rbs +29 -0
- data/sig/pvectl/services/sendkey.rbs +19 -0
- data/sig/pvectl/services/service_lifecycle.rbs +17 -0
- data/sig/pvectl/services/set_container.rbs +14 -0
- data/sig/pvectl/services/set_node.rbs +23 -0
- data/sig/pvectl/services/set_vm.rbs +14 -0
- data/sig/pvectl/services/set_volume.rbs +12 -0
- data/sig/pvectl/services/snapshot.rbs +35 -0
- data/sig/pvectl/services/task_listing.rbs +13 -0
- data/sig/pvectl/services/unlink_disk.rbs +17 -0
- data/sig/pvectl/services/vm_lifecycle.rbs +26 -0
- data/sig/pvectl/services/wakeonlan.rbs +17 -0
- data/sig/pvectl/utils/resource_resolver.rbs +17 -0
- data/sig/pvectl/wizards/create_container.rbs +21 -0
- data/sig/pvectl/wizards/create_vm.rbs +21 -0
- data/sig/pvectl.rbs +9 -0
- metadata +675 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Parsers
|
|
3
|
+
class NetConfig
|
|
4
|
+
VALID_KEYS: Array[String]
|
|
5
|
+
|
|
6
|
+
REQUIRED_KEYS: Array[String]
|
|
7
|
+
|
|
8
|
+
OPTIONAL_FLAGS: Array[String]
|
|
9
|
+
|
|
10
|
+
def self.parse: (String string) -> Hash[Symbol, String]
|
|
11
|
+
|
|
12
|
+
def self.to_proxmox: (Hash[Symbol, String] config) -> String
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def self.validate!: (Hash[Symbol, String] config) -> void
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
class PluginLoader
|
|
3
|
+
BUILTIN_COMMANDS: Array[untyped]
|
|
4
|
+
|
|
5
|
+
self.@registered_plugins: Array[untyped]
|
|
6
|
+
|
|
7
|
+
def self.register_plugin: (untyped klass) -> void
|
|
8
|
+
|
|
9
|
+
def self.registered_plugins: () -> Array[untyped]
|
|
10
|
+
|
|
11
|
+
def self.load_all: (untyped cli) -> void
|
|
12
|
+
|
|
13
|
+
def self.load_builtins: (untyped cli) -> void
|
|
14
|
+
|
|
15
|
+
def self.load_gem_plugins: (untyped cli) -> void
|
|
16
|
+
|
|
17
|
+
def self.load_directory_plugins: (untyped cli) -> void
|
|
18
|
+
|
|
19
|
+
def self.directory_plugins_path: () -> String
|
|
20
|
+
|
|
21
|
+
def self.flush_registered_plugins: (untyped cli) -> void
|
|
22
|
+
|
|
23
|
+
def self.reset!: () -> void
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class AptPackage < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def truncate: (String? text, Integer length) -> String
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Backup < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[untyped]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[untyped]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def format_type: (Symbol? resource_type) -> String
|
|
17
|
+
|
|
18
|
+
def format_time: (Time? time) -> String
|
|
19
|
+
|
|
20
|
+
def format_protected: (bool protected_status) -> String
|
|
21
|
+
|
|
22
|
+
def truncate: (String? text, Integer max_length) -> String?
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def wide_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def extra_columns: () -> Array[String]
|
|
9
|
+
|
|
10
|
+
def to_row: (untyped model, **untyped context) -> Array[String?]
|
|
11
|
+
|
|
12
|
+
def to_wide_row: (untyped model, **untyped context) -> Array[String?]
|
|
13
|
+
|
|
14
|
+
def extra_values: (untyped model, **untyped context) -> Array[String?]
|
|
15
|
+
|
|
16
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
17
|
+
|
|
18
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
19
|
+
|
|
20
|
+
def uptime_human: () -> String
|
|
21
|
+
|
|
22
|
+
def tags_array: () -> Array[String]
|
|
23
|
+
|
|
24
|
+
def tags_display: () -> String
|
|
25
|
+
|
|
26
|
+
def template_display: () -> String
|
|
27
|
+
|
|
28
|
+
private
|
|
29
|
+
|
|
30
|
+
def resource: () -> untyped
|
|
31
|
+
|
|
32
|
+
def format_task_history: (Array[untyped]? tasks) -> (Array[Hash[String, String]] | String)
|
|
33
|
+
|
|
34
|
+
def format_firewall: (Hash[Symbol, untyped]? firewall_data) -> (Hash[String, untyped] | String)
|
|
35
|
+
|
|
36
|
+
def format_firewall_rules: (Hash[Symbol, untyped]? firewall_data) -> (Array[Hash[String, String]] | String)
|
|
37
|
+
|
|
38
|
+
def format_bytes: (Integer? bytes) -> String
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Capability < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def details: (untyped model) -> String
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
module Config
|
|
4
|
+
class Context < Pvectl::Presenters::Base
|
|
5
|
+
def columns: () -> Array[String]
|
|
6
|
+
|
|
7
|
+
def extra_columns: () -> Array[String]
|
|
8
|
+
|
|
9
|
+
def to_row: (untyped context, ?current_context: String?, **untyped context_kwargs) -> Array[String]
|
|
10
|
+
|
|
11
|
+
def extra_values: (untyped context, **untyped context_kwargs) -> Array[String?]
|
|
12
|
+
|
|
13
|
+
def to_hash: (untyped context) -> Hash[String, untyped]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Container < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String?]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String?]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
def display_name: () -> String
|
|
17
|
+
|
|
18
|
+
def cpu_percent: () -> String
|
|
19
|
+
|
|
20
|
+
def memory_used_gib: () -> Float?
|
|
21
|
+
|
|
22
|
+
def memory_total_gib: () -> Float?
|
|
23
|
+
|
|
24
|
+
def memory_display: () -> String
|
|
25
|
+
|
|
26
|
+
def swap_used_mib: () -> Float?
|
|
27
|
+
|
|
28
|
+
def swap_total_mib: () -> Float?
|
|
29
|
+
|
|
30
|
+
def swap_display: () -> String
|
|
31
|
+
|
|
32
|
+
def disk_used_gib: () -> Float?
|
|
33
|
+
|
|
34
|
+
def disk_total_gib: () -> Float?
|
|
35
|
+
|
|
36
|
+
def disk_display: () -> String
|
|
37
|
+
|
|
38
|
+
def pool_display: () -> String
|
|
39
|
+
|
|
40
|
+
def netin_display: () -> String
|
|
41
|
+
|
|
42
|
+
def netout_display: () -> String
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
attr_reader container: untyped
|
|
47
|
+
alias resource container
|
|
48
|
+
|
|
49
|
+
@consumed_keys: Set[Symbol]
|
|
50
|
+
|
|
51
|
+
def format_summary: () -> Hash[String, untyped]
|
|
52
|
+
|
|
53
|
+
def format_resources: (Hash[Symbol, untyped] config) -> Hash[String, untyped]
|
|
54
|
+
|
|
55
|
+
def format_options: (Hash[Symbol, untyped] config) -> Hash[String, String]
|
|
56
|
+
|
|
57
|
+
def format_rootfs: (?Hash[Symbol, untyped] config) -> Hash[String, String]
|
|
58
|
+
|
|
59
|
+
def format_network_interfaces: (?Hash[Symbol, untyped] config) -> (Array[Hash[String, String]] | String)
|
|
60
|
+
|
|
61
|
+
def format_features: (?Hash[Symbol, untyped] config) -> String
|
|
62
|
+
|
|
63
|
+
def format_mountpoints: (Hash[Symbol, untyped] config) -> (Array[Hash[String, String]] | String)
|
|
64
|
+
|
|
65
|
+
def format_dns: (Hash[Symbol, untyped] config) -> (Hash[String, String] | String)
|
|
66
|
+
|
|
67
|
+
def format_snapshots: (Array[Hash[Symbol, untyped]]? snapshots) -> (Array[Hash[String, String?]] | String)
|
|
68
|
+
|
|
69
|
+
def format_ha: () -> Hash[String, String]
|
|
70
|
+
|
|
71
|
+
def consume: (*Symbol keys) -> void
|
|
72
|
+
|
|
73
|
+
def consume_matching: (Hash[Symbol, untyped] config, Regexp pattern) -> void
|
|
74
|
+
|
|
75
|
+
def format_remaining: (Hash[Symbol, untyped] config) -> (Array[Hash[String, String]] | String)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class ContainerOperationResult < OperationResult
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def display_name: (untyped container) -> String
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Disk < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
attr_reader disk: untyped
|
|
19
|
+
|
|
20
|
+
def format_size: () -> String
|
|
21
|
+
|
|
22
|
+
def format_boolean: (Integer? value) -> String
|
|
23
|
+
|
|
24
|
+
def device_info_section: () -> Hash[String, String]
|
|
25
|
+
|
|
26
|
+
def smart_attributes_section: () -> Array[Hash[String, String]]
|
|
27
|
+
|
|
28
|
+
def format_ata_attributes: () -> Array[Hash[String, String]]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class DnsConfig < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def to_row: (Models::DnsConfig model, **untyped context) -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_hash: (Models::DnsConfig model) -> Hash[String, untyped]
|
|
9
|
+
|
|
10
|
+
def to_description: (Models::DnsConfig model) -> Hash[String, untyped]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class HostsFile < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def to_row: (Models::HostsFile model, **untyped context) -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_hash: (Models::HostsFile model) -> Hash[String, untyped]
|
|
9
|
+
|
|
10
|
+
def to_description: (Models::HostsFile model) -> Hash[String, untyped]
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Node < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String?]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String?]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
def cpu_percent: () -> String
|
|
17
|
+
|
|
18
|
+
def memory_used_gb: () -> Float?
|
|
19
|
+
|
|
20
|
+
def memory_total_gb: () -> Integer?
|
|
21
|
+
|
|
22
|
+
def memory_display: () -> String
|
|
23
|
+
|
|
24
|
+
def disk_used_gb: () -> Float?
|
|
25
|
+
|
|
26
|
+
def disk_total_gb: () -> Float?
|
|
27
|
+
|
|
28
|
+
def storage_display: () -> String
|
|
29
|
+
|
|
30
|
+
def swap_used_gb: () -> Float?
|
|
31
|
+
|
|
32
|
+
def swap_total_gb: () -> Integer?
|
|
33
|
+
|
|
34
|
+
def swap_display: () -> String
|
|
35
|
+
|
|
36
|
+
def load_1m: () -> Float?
|
|
37
|
+
|
|
38
|
+
def load_display: () -> String
|
|
39
|
+
|
|
40
|
+
def uptime_human: () -> String
|
|
41
|
+
|
|
42
|
+
def version_display: () -> String
|
|
43
|
+
|
|
44
|
+
def kernel_display: () -> String
|
|
45
|
+
|
|
46
|
+
def ip_display: () -> String
|
|
47
|
+
|
|
48
|
+
def alerts: () -> Array[String]
|
|
49
|
+
|
|
50
|
+
def alerts_display: () -> String
|
|
51
|
+
|
|
52
|
+
def has_alerts?: () -> bool
|
|
53
|
+
|
|
54
|
+
def cpu_model: () -> String?
|
|
55
|
+
|
|
56
|
+
def cpu_sockets: () -> Integer?
|
|
57
|
+
|
|
58
|
+
def cpu_cores: () -> Integer?
|
|
59
|
+
|
|
60
|
+
def boot_mode: () -> String
|
|
61
|
+
|
|
62
|
+
def subscription_display: () -> String
|
|
63
|
+
|
|
64
|
+
def timezone: () -> String
|
|
65
|
+
|
|
66
|
+
def local_time: () -> String
|
|
67
|
+
|
|
68
|
+
def dns_search: () -> String
|
|
69
|
+
|
|
70
|
+
def dns_nameservers: () -> String
|
|
71
|
+
|
|
72
|
+
def rootfs_usage_percent: () -> Integer?
|
|
73
|
+
|
|
74
|
+
def rootfs_display: () -> String
|
|
75
|
+
|
|
76
|
+
private
|
|
77
|
+
|
|
78
|
+
attr_reader node: untyped
|
|
79
|
+
alias resource node
|
|
80
|
+
|
|
81
|
+
def offline_description: () -> Hash[String, untyped]
|
|
82
|
+
|
|
83
|
+
def memory_percent_display: (untyped model) -> String
|
|
84
|
+
|
|
85
|
+
def swap_percent_display: (untyped model) -> String
|
|
86
|
+
|
|
87
|
+
def format_gib: (Integer? bytes) -> String
|
|
88
|
+
|
|
89
|
+
def format_network_interfaces: (Array[Hash[Symbol, untyped]]? interfaces) -> (Array[Hash[String, untyped]] | String)
|
|
90
|
+
|
|
91
|
+
def format_services: (Array[Hash[Symbol, untyped]]? services) -> (Array[Hash[String, untyped]] | String)
|
|
92
|
+
|
|
93
|
+
def format_storage_pools: (Array[untyped]? pools) -> (Array[Hash[String, untyped]] | String)
|
|
94
|
+
|
|
95
|
+
def format_physical_disks: (Array[Hash[Symbol, untyped]]? disks) -> (Array[Hash[String, untyped]] | String)
|
|
96
|
+
|
|
97
|
+
def format_cpu_models: (Array[Hash[Symbol, untyped]]? models) -> (Array[Hash[String, untyped]] | String)
|
|
98
|
+
|
|
99
|
+
def format_machines: (Array[Hash[Symbol, untyped]]? machines) -> (Array[Hash[String, untyped]] | String)
|
|
100
|
+
|
|
101
|
+
def memory_percent: (untyped model) -> Float?
|
|
102
|
+
|
|
103
|
+
def swap_percent: (untyped model) -> Float?
|
|
104
|
+
|
|
105
|
+
def storage_percent: (untyped model) -> Float?
|
|
106
|
+
|
|
107
|
+
def storage_enabled?: (untyped pool) -> bool
|
|
108
|
+
|
|
109
|
+
def format_storage_pool: (untyped pool) -> Hash[String, untyped]
|
|
110
|
+
|
|
111
|
+
def format_storage_pool_model: (untyped pool) -> Hash[String, untyped]
|
|
112
|
+
|
|
113
|
+
def format_storage_pool_hash: (Hash[Symbol, untyped] pool) -> Hash[String, untyped]
|
|
114
|
+
|
|
115
|
+
def format_storage_size: (Float gb) -> String
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class NodeOperationResult < OperationResult
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class OperationResult < Base
|
|
4
|
+
include Formatters::ColorSupport
|
|
5
|
+
|
|
6
|
+
private
|
|
7
|
+
|
|
8
|
+
def status_display: (untyped model) -> String
|
|
9
|
+
|
|
10
|
+
def task_upid: (untyped model) -> String
|
|
11
|
+
|
|
12
|
+
def duration_display: (untyped model) -> String
|
|
13
|
+
|
|
14
|
+
def colorize: (String text, Symbol color) -> String
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Service < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (Models::Service model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (Models::Service model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (Models::Service model) -> Hash[String, String?]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Snapshot < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> (Hash[String, untyped] | Array[Hash[String, untyped]])
|
|
13
|
+
|
|
14
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def snapshot_to_hash: (Models::Snapshot model) -> Hash[String, untyped]
|
|
19
|
+
|
|
20
|
+
def build_single_description: (Models::SnapshotDescription::Entry entry) -> Hash[String, untyped]
|
|
21
|
+
|
|
22
|
+
def build_multi_description: (Array[Models::SnapshotDescription::Entry] entries) -> Hash[String, untyped]
|
|
23
|
+
|
|
24
|
+
def build_tree_string: (Models::SnapshotDescription::Entry entry) -> String
|
|
25
|
+
|
|
26
|
+
def render_tree_node: (String name, Hash[String, Array[String]] children_map, String target, String prefix, bool last, Array[String] lines) -> void
|
|
27
|
+
|
|
28
|
+
def build_children_map: (Array[Models::Snapshot] siblings) -> Hash[String, Array[String]]
|
|
29
|
+
|
|
30
|
+
def build_tree_data: (Models::SnapshotDescription::Entry entry) -> Array[Hash[String, untyped]]
|
|
31
|
+
|
|
32
|
+
def format_time: (Time? time) -> String
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class SnapshotOperationResult < Base
|
|
4
|
+
include Formatters::ColorSupport
|
|
5
|
+
|
|
6
|
+
def columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def extra_columns: () -> Array[String]
|
|
9
|
+
|
|
10
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
13
|
+
|
|
14
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def status_display: (untyped model) -> String
|
|
19
|
+
|
|
20
|
+
def task_upid: (untyped model) -> String
|
|
21
|
+
|
|
22
|
+
def duration_display: (untyped model) -> String
|
|
23
|
+
|
|
24
|
+
def colorize: (String text, Symbol color) -> String
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Storage < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
13
|
+
|
|
14
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
def type_display: () -> String
|
|
17
|
+
|
|
18
|
+
def status_display: () -> String
|
|
19
|
+
|
|
20
|
+
def node_display: () -> String
|
|
21
|
+
|
|
22
|
+
def disk_used_gb: () -> Float?
|
|
23
|
+
|
|
24
|
+
def disk_total_gb: () -> Float?
|
|
25
|
+
|
|
26
|
+
def usage_percent: () -> Integer?
|
|
27
|
+
|
|
28
|
+
def avail_gb: () -> Float?
|
|
29
|
+
|
|
30
|
+
def avail_display: () -> String
|
|
31
|
+
|
|
32
|
+
def used_display: () -> String
|
|
33
|
+
|
|
34
|
+
def total_display: () -> String
|
|
35
|
+
|
|
36
|
+
def usage_display: () -> String
|
|
37
|
+
|
|
38
|
+
def content_display: () -> String
|
|
39
|
+
|
|
40
|
+
def shared_display: () -> String
|
|
41
|
+
|
|
42
|
+
private
|
|
43
|
+
|
|
44
|
+
attr_reader storage: untyped
|
|
45
|
+
|
|
46
|
+
def format_size: (Float gb) -> String
|
|
47
|
+
|
|
48
|
+
def nodes_display: () -> String
|
|
49
|
+
|
|
50
|
+
def build_capacity_section: () -> Hash[String, String]
|
|
51
|
+
|
|
52
|
+
def build_configuration_section: () -> (Hash[String, String] | String)
|
|
53
|
+
|
|
54
|
+
def format_content_summary: () -> (Array[Hash[String, String]] | String)
|
|
55
|
+
|
|
56
|
+
def format_backup_retention: () -> (Hash[String, untyped] | String)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Pvectl
|
|
2
|
+
module Presenters
|
|
3
|
+
class Subscription < Base
|
|
4
|
+
def columns: () -> Array[String]
|
|
5
|
+
|
|
6
|
+
def extra_columns: () -> Array[String]
|
|
7
|
+
|
|
8
|
+
def to_row: (untyped model, **untyped context) -> Array[String]
|
|
9
|
+
|
|
10
|
+
def extra_values: (untyped model, **untyped context) -> Array[String]
|
|
11
|
+
|
|
12
|
+
def to_wide_row: (untyped model, **untyped context) -> Array[String]
|
|
13
|
+
|
|
14
|
+
def to_hash: (untyped model) -> Hash[String, untyped]
|
|
15
|
+
|
|
16
|
+
def to_description: (untyped model) -> Hash[String, untyped]
|
|
17
|
+
|
|
18
|
+
def node_display: () -> String
|
|
19
|
+
def status_display: () -> String
|
|
20
|
+
def level_display: () -> String
|
|
21
|
+
def product_display: () -> String
|
|
22
|
+
def regdate_display: () -> String
|
|
23
|
+
def serverid_display: () -> String
|
|
24
|
+
def nextduedate_display: () -> String
|
|
25
|
+
def sockets_display: () -> String
|
|
26
|
+
def message_display: () -> String
|
|
27
|
+
def checktime_display: () -> String
|
|
28
|
+
def masked_key: () -> String
|
|
29
|
+
def full_key_display: () -> String
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
attr_reader subscription: untyped
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|