Move instances into a separate component
This commit is contained in:
parent
233a51d4cd
commit
a8da3f70eb
46 changed files with 553 additions and 551 deletions
|
|
@ -46,12 +46,12 @@ func (r reserve) Run(context wisski_distillery.Context) error {
|
|||
|
||||
// check that it doesn't already exist
|
||||
logging.LogMessage(context.IOStream, "Reserving new WissKI instance %s", slug)
|
||||
if exists, err := dis.HasInstance(slug); err != nil || exists {
|
||||
if exists, err := dis.Instances().Has(slug); err != nil || exists {
|
||||
return errProvisionAlreadyExists.WithMessageF(slug)
|
||||
}
|
||||
|
||||
// make it in-memory
|
||||
instance, err := dis.NewInstance(slug)
|
||||
instance, err := dis.Instances().Create(slug)
|
||||
if err != nil {
|
||||
return errProvisionGeneric.WithMessageF(slug, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue