func buildReserveNodeWorkflowOptions(c config.Cpi, nodeID string) (reserveNodeWorkflowOptions, error) {
	options := reserveNodeWorkflowOptions{}

	obmServiceName, err := rackhdapi.GetOBMServiceName(c, nodeID)
	if err != nil {
		return reserveNodeWorkflowOptions{}, err
	}
	options.OBMServiceName = &obmServiceName

	return options, nil
}
func buildProvisionWorkflowOptions(c config.Cpi, nodeID string, vmCID string, stemcellCID string, wipeDisk bool) (ProvisionNodeWorkflowOptions, error) {
	envPath := rackhdapi.RackHDEnvPath
	options := ProvisionNodeWorkflowOptions{
		AgentSettingsFile: &nodeID,
		AgentSettingsPath: &envPath,
		CID:               &vmCID,
		StemcellFile:      &stemcellCID,
		WipeDisk:          strconv.FormatBool(wipeDisk),
	}

	obmServiceName, err := rackhdapi.GetOBMServiceName(c, nodeID)
	if err != nil {
		return ProvisionNodeWorkflowOptions{}, fmt.Errorf("error retrieving obm settings from node: %s", nodeID)
	}
	options.OBMServiceName = &obmServiceName

	return options, nil
}
							n = append(n, nodes[i])
						}
					}
					return n
				}

				allNodes, err := rackhdapi.GetNodes(cpiConfig)
				Expect(err).ToNot(HaveOccurred())
				idleNodes = rejectNodesRunningWorkflows(allNodes)

				t := time.Now()
				rand.Seed(t.Unix())
				i := rand.Intn(len(idleNodes))
				nodeID = idleNodes[i].ID

				obm, err = rackhdapi.GetOBMServiceName(cpiConfig, nodeID)
				Expect(err).ToNot(HaveOccurred())

				uuidObj, err := uuid.NewV4()
				Expect(err).ToNot(HaveOccurred())
				guid = uuidObj.String()
			})

			Context("when the workflow completes successfully", func() {
				It("returns no error", func() {
					fakeWorkflow := helpers.LoadWorkflow("../spec_assets/dummy_succeeding_workflow.json")
					fakeWorkflow.Name = fmt.Sprintf("Test.Success.CF.Fake.%s", guid)

					fakeWorkflowStubBytes, err := json.Marshal(fakeWorkflow)
					Expect(err).ToNot(HaveOccurred())