Skip to content

Commit 57076aa

Browse files
committed
Remove soon-to-be-unneeded CLI commands
Simplifes the CLI by removing commands that aren’t needed if we aren’t relying on the internal Parallels registry.
1 parent 96a3eb9 commit 57076aa

15 files changed

+2
-635
lines changed

Sources/hostmgr/SyncCommand.swift

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,7 @@ struct SyncCommand: AsyncParsableCommand {
77
commandName: "sync",
88
abstract: "Sync remote data with this host",
99
subcommands: [
10-
SyncAuthorizedKeysCommand.self,
11-
SyncVMImagesCommand.self
10+
SyncAuthorizedKeysCommand.self
1211
]
1312
)
14-
15-
@Flag(help: "List available sync tasks")
16-
var list: Bool = false
17-
18-
@OptionGroup
19-
var options: SharedSyncOptions
20-
21-
mutating func run() async throws {
22-
23-
if list {
24-
Configuration.SchedulableSyncCommand.allCases.forEach { print($0) }
25-
return
26-
}
27-
28-
// Always regenerate the git mirror manifest – this is a lazy hack
29-
// to make it so it doesn't need to be installed separately
30-
try GenerateGitMirrorManifestTask().run()
31-
32-
for task in Configuration.shared.syncTasks {
33-
options.force ? print("Force-running \(task.rawValue)") : print("Running \(task.rawValue)")
34-
try await perform(task: task)
35-
}
36-
}
37-
38-
private func perform(task: Configuration.SchedulableSyncCommand) async throws {
39-
switch task {
40-
case .authorizedKeys:
41-
let command = SyncAuthorizedKeysCommand(options: self._options)
42-
try await command.run()
43-
case .vmImages:
44-
let command = SyncVMImagesCommand(options: self._options)
45-
try await command.run()
46-
}
47-
}
4813
}

Sources/hostmgr/VMCommand.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ struct VMCommand: AsyncParsableCommand {
1212
VMStartCommand.self,
1313
VMStopCommand.self,
1414
VMDetailsCommand.self,
15-
VMDeleteCommand.self,
16-
VMCloneCommand.self,
17-
VMCleanCommand.self,
18-
VMImportCommand.self,
19-
VMImageCommand.self,
20-
VMExistsCommand.self
15+
VMCleanCommand.self
2116
]
2217
)
2318
}

Sources/hostmgr/commands/sync/SyncVMImagesCommand.swift

Lines changed: 0 additions & 90 deletions
This file was deleted.

Sources/hostmgr/commands/vm/ImageCommand.swift

Lines changed: 0 additions & 15 deletions
This file was deleted.

Sources/hostmgr/commands/vm/VMClone.swift

Lines changed: 0 additions & 155 deletions
This file was deleted.

Sources/hostmgr/commands/vm/VMDelete.swift

Lines changed: 0 additions & 36 deletions
This file was deleted.

Sources/hostmgr/commands/vm/VMExists.swift

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)