|
@@ -259,7 +259,7 @@ public class ServerService
|
|
}
|
|
}
|
|
|
|
|
|
public async Task<Server> Create(string name, int cpu, long memory, long disk, User u, Image i, Node? n = null,
|
|
public async Task<Server> Create(string name, int cpu, long memory, long disk, User u, Image i, Node? n = null,
|
|
- Action<Server>? modifyDetails = null, int allocations = 1)
|
|
|
|
|
|
+ Action<Server>? modifyDetails = null)
|
|
{
|
|
{
|
|
var user = UserRepository
|
|
var user = UserRepository
|
|
.Get()
|
|
.Get()
|
|
@@ -271,6 +271,8 @@ public class ServerService
|
|
.Include(x => x.DockerImages)
|
|
.Include(x => x.DockerImages)
|
|
.First(x => x.Id == i.Id);
|
|
.First(x => x.Id == i.Id);
|
|
|
|
|
|
|
|
+ var allocations = image.Allocations;
|
|
|
|
+
|
|
Node node = n ?? NodeRepository.Get().First();
|
|
Node node = n ?? NodeRepository.Get().First();
|
|
|
|
|
|
NodeAllocation[] freeAllocations;
|
|
NodeAllocation[] freeAllocations;
|