// CreateService creates new service from serviceCatalog
CreateService creates new service from serviceCatalog
// CreateService creates new service from serviceCatalog
func CreateService(client *occlient.Client, serviceName string, serviceType string, servicePlan string, parameters []string, applicationName string) error {
	labels := componentlabels.GetLabels(serviceName, applicationName, true)
	labels[componentlabels.ComponentTypeLabel] = serviceType
	mapOfParameters := util.ConvertKeyValueStringToMap(parameters)
	err := client.CreateServiceInstance(serviceName, serviceType, servicePlan, mapOfParameters, labels)
	if err != nil {
		return errors.Wrap(err, "unable to create service instance")
	}
	return nil
}
func CreateService ( client * occlient . Client , serviceName string , serviceType string , servicePlan string , parameters [ ] string , applicationName string ) error { labels := componentlabels . GetLabels ( serviceName , applicationName , true ) labels [ componentlabels . ComponentTypeLabel ] = serviceType mapOfParameters := util . ConvertKeyValueStringToMap ( parameters ) err := client . CreateServiceInstance ( serviceName , serviceType , servicePlan , mapOfParameters , labels ) if err != nil { return errors . Wrap ( err , " " ) } return nil }
CreateService creates new service from serviceCatalog
CreateService creates new service from serviceCatalog
// save service type as label