Free cookie consent management tool by TermsFeed Policy Generator

Changeset 827


Ignore:
Timestamp:
11/26/08 16:32:03 (16 years ago)
Author:
msteinbi
Message:

Added Clients to the ClientGroups in the dummy implementation (#395)

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/BusinessObjects/ClientGroup.cs

    r795 r827  
    3333    public long ClientGroupId { get; set; }
    3434    [DataMember]
    35     public String Name { get; set; }
     35    public List<Resource> Resources { get; set; }
    3636  }
    3737}
  • trunk/sources/HeuristicLab.Hive.Contracts/BusinessObjects/Resource.cs

    r825 r827  
    3333    public long ResourceId { get; set; }
    3434    [DataMember]
    35     public string name { get; set; }
     35    public string Name { get; set; }
    3636
    3737  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs

    r820 r827  
    1616      clientGroups = new List<ClientGroup>();
    1717
    18       clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2500, Memory=4096, ResourceId=1, State=State.idle });
    19       clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2100, Memory=2048, ResourceId=2, State=State.idle });
    20       clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=3400, Memory=4096, ResourceId=3, State=State.calculating });
     18      ClientInfo c1 = new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2500, Memory=4096, ResourceId=1, State=State.idle }
     19      ClientInfo c2 = new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2100, Memory=2048, ResourceId=2, State=State.idle }
     20      ClientInfo c3 = new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=3400, Memory=4096, ResourceId=3, State=State.calculating }
    2121
    22       clientGroups.Add(new ClientGroup { ResourceId = 4, Name = "SuperGroup", ClientGroupId = 1 });
     22      clients.Add(c1);
     23      clients.Add(c2);
     24      clients.Add(c3);
     25
     26      ClientGroup cg = new ClientGroup { ResourceId = 4, Name = "SuperGroup", ClientGroupId = 1 };
     27      cg.Resources.Add(c1);     
     28      cg.Resources.Add(c2);
     29      cg.Resources.Add(c3);
     30
     31      clientGroups.Add(cg);
    2332    }
    2433
Note: See TracChangeset for help on using the changeset viewer.