refactoring workplace Application.kt & improve CliApplication.puml
This commit is contained in:
parent
c78ea3b432
commit
acfc5ae753
3 changed files with 6 additions and 6 deletions
|
@ -52,8 +52,8 @@ WorkplaceConfig <- ConfigRepository : create
|
|||
WorkplaceConfig --> ConfigRepository : config
|
||||
CliWorkplace <-- ConfigRepository : config
|
||||
|
||||
CliWorkplace -> Application : provision
|
||||
Application -> ProvInstance : provisionWorkplace
|
||||
CliWorkplace -> Application : provision ( config )
|
||||
Application -> ProvInstance : provisionWorkplace ( type, ssh, ...)
|
||||
ProvInstance -> ProvisionWorkplace : provisionWorkplace
|
||||
|
||||
ProvisionWorkplace -> InfrastructureModules: Various calls like:
|
||||
|
|
|
@ -7,8 +7,8 @@ import org.domaindrivenarchitecture.provs.workplace.domain.WorkplaceConfig
|
|||
/**
|
||||
* Use case for provisioning a workplace
|
||||
*/
|
||||
fun Prov.provision(conf: WorkplaceConfig) = def {
|
||||
fun provision(prov: Prov, conf: WorkplaceConfig) {
|
||||
with (conf) {
|
||||
provisionWorkplace(type, ssh?.keyPair(), gpg?.keyPair(), gitUserName, gitEmail)
|
||||
prov.provisionWorkplace(type, ssh?.keyPair(), gpg?.keyPair(), gitUserName, gitEmail)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ private fun provisionWorkplace(cliCommand: WorkplaceCliCommand) {
|
|||
try {
|
||||
val conf = getConfig(filename)
|
||||
|
||||
val prov = createProvInstance(cliCommand.target)
|
||||
prov.provision(conf)
|
||||
val prov = createProvInstance(cliCommand.target, remoteHostSetSudoWithoutPasswordRequired = true)
|
||||
provision(prov, conf)
|
||||
|
||||
} catch (e: IllegalArgumentException) {
|
||||
println(
|
||||
|
|
Loading…
Reference in a new issue