private void button1_Click(object sender, EventArgs e) { StackRequest request = new StackRequest(); ProvisionTask r = new ProvisionTask(); r.state = 0; r.commonname = "W2008R2-BASE"; r.domain = "mojo.local"; r.environment = "production"; r.location = "benifold"; r.provider = Provider.Vagrant; r.puppetmaster = "puppet.mojo.local"; r.puppetversion = "3.7.3"; r.role = "web"; r.target = "achilles"; r.cpus = 2; r.memory = 2536; r.puppetclasses = new List <string>(); r.puppetclasses.Add("joet"); request.Instances.Add(r); HttpClient client = new HttpClient(); HttpResponseMessage response = client.PostAsJsonAsync("http://provsvc/provisioning/api/stack", request).Result; ; }
public void Start() { if (target != null && target != lastTarget) { StackRequest.RequestPath(transform.position, target.position, OnPathFound); lastTarget = target; } }
public Guid ProcessStack(StackRequest request) { MessageQueue provisionqueue = new MessageQueue(ProvisionQueue); request.ID = Guid.NewGuid(); foreach (ProvisionTask task in request.Instances) { task.taskid = Guid.NewGuid(); task.parentid = request.ID; provisionqueue.Send(task); } //Need to store request in database return(request.ID); }
void Awake() { requestManager = GetComponent <StackRequest>(); grid = GetComponent <Grid>(); }
void Awake() { instance = this; pathfinding = GetComponent <AStarAlgo>(); }
public Guid PostStack(StackRequest request) { Guid id = processor.ProcessStack(request); return(id); }