public RoleToServerMap Parse(FileInfo file) { var binder = ConfigurationBinderFactory.New(c => { //c.AddJsonFile(file.FullName); var content = File.ReadAllText(file.FullName); c.AddJson(content); }); var d = binder.GetAll(); var result = new RoleToServerMap(); foreach (var kvp in d) { result.AddMap(kvp.Key, kvp.Value.ToString()); } return(result); }
public DeploymentPlan GetPlan(Deployment deployment, RoleToServerMap serverMappings) { _serverMappings = serverMappings; deployment.InspectWith(this); return(_plan); }
public void EstablishContext() { Deployment = new TwoRoleDeploy(); Deployment.Initialize(new SampleConfiguration()); Map = new RoleToServerMap(); Map.AddMap("Web", "SrvTopeka09"); Map.AddMap("Web", "SrvTopeka19"); Inspector = new DropkickDeploymentInspector(Map); }
public void EstablishContext() { Deployment = new TwoPartDeploy(); Inspector = new DropkickDeploymentInspector(); Map = new RoleToServerMap(); Map.AddMap("Web", "SrvTopeka09"); Map.AddMap("Web", "SrvTopeka19"); Map.AddMap("Db", "SrvTopeka02"); BecauseOf(); }
public void TryWeb() { var dep = new TwoPartDeploy(); var maps = new RoleToServerMap(); maps.AddMap("WEB", "BOB"); var ins = new DropkickDeploymentInspector(); var plan = ins.GetPlan(dep, maps); Assert.AreEqual(1, plan.RoleCount); }
public void TryAll() { var dep = new TwoRoleDeploy(); dep.Initialize(new object()); var maps = new RoleToServerMap(); maps.AddMap("DB", "BOB"); var ins = new DropkickDeploymentInspector(maps); var plan = ins.GetPlan(dep); Assert.AreEqual(2, plan.RoleCount); }
public void TryWeb() { var dep = new TwoRoleDeploy(); dep.Initialize(new object()); var maps = new RoleToServerMap(); var ins = new DropkickDeploymentInspector(maps); ins.RolesToGet("Web"); //how to set the roles var plan = ins.GetPlan(dep); Assert.AreEqual(1, plan.RoleCount); }
public void TryDb() { var dep = new TwoRoleDeploy(); dep.Initialize(new SampleConfiguration()); var maps = new RoleToServerMap(); maps.AddMap("DB", "BOB"); maps.AddMap("WEB", "BILL"); var ins = new DropkickDeploymentInspector(maps); ins.RolesToGet("Db"); var plan = ins.GetPlan(dep); Assert.AreEqual(1, plan.RoleCount); }
public RoleToServerMap Parse(FileInfo file) { var binder = ConfigurationBinderFactory.New(c => { var content = File.ReadAllText(file.FullName); c.AddJson(content); }); var d = binder.GetAll(); var result = new RoleToServerMap(); foreach (var kvp in d) { result.AddMap( stripIndexerFromKey(kvp.Key), kvp.Value.ToString()); } return result; }
public DeploymentArguments() { Command = DeploymentCommands.Trace; Role = "ALL"; ServerMappings = new RoleToServerMap(); }
public DropkickDeploymentInspector(RoleToServerMap maps) : base("Look") { _serverMappings = maps; }