func (this *CloudFoundryController) Post() {
	model := this.GetString("model")
	erros := make([]error, 0)
	switch model {
	case utils.CloudFoundryProperties:
		cloudFoundryProperties = entity.NewCloudFoundryProperties(
			this.GetString("name"),
			this.GetString("uuid"),
			this.GetString("floatingIp"),
			this.GetString("systemDomain"),
			this.GetString("systemDomainOrg"))

		id, err := this.GetInt64("id", 0)
		if err == nil {
			cloudFoundryProperties.Id = id
		}
		this.CommitData(cloudFoundryProperties)
	case utils.NetWorks:
		iaas := this.GetString("iaasVsersion")
		// use default MicroBOSH vip
		privateNetWorks = entity.NewNetWorks(this.GetString("private-name"),
			this.GetString("private-netWorkName"),
			this.GetString("private-netType"),
			this.GetString("private-netId"),
			this.GetString("private-cidr"),
			this.GetString("private-dns"),
			mi.NetWork.Vip,
			this.GetString("private-reservedIp"),
			this.GetString("private-staticIp"))
		//rebuild
		netWorksMap = make(map[string]entity.NetWorks)
		netWorksMap[utils.Net_Private] = privateNetWorks

		if iaas == defaultVersion {
			publicNetWorks = entity.NewNetWorks(this.GetString("public-name"),
				this.GetString("public-netWorkName"),
				this.GetString("public-netType"),
				this.GetString("public-netId"),
				this.GetString("public-cidr"),
				"",
				"",
				"",
				this.GetString("public-staticIp"))
		} else {
			publicNetWorks = entity.NewFloatingNetWork(cf.CloudFoundryProperties.FloatingIp)
		}
		netWorksMap[utils.Net_Public] = publicNetWorks

		compilation = cf.Compilation
		compilation.DefaultNetWork = privateNetWorks.Name
		this.CommitData(compilation)

		for key, _ := range resourcesPoolsMap {
			resourcesPoolsMap[key].DefaultNetWork = privateNetWorks.Name
		}

		this.CommitData(resourcesPoolsMap)
		this.CommitData(netWorksMap)
	case utils.Compilation:
		workers, _ := this.GetInt("workers", 6)
		if workers <= 0 {
			workers = 6
		}
		compilation = entity.NewCompilation(this.GetString("instanceType"),
			this.GetString("availabilityZone"),
			workers,
			this.GetString("defaultNetWork"))

		id, err := this.GetInt64("id", 0)
		if err == nil {
			compilation.Id = id
		}
		this.CommitData(compilation)
	case utils.ResourcesPools:
		arrName := this.GetStrings("name")
		arrInstanceType := this.GetStrings("instanceType")
		arrAvailabilityZone := this.GetStrings("availabilityZone")
		arrDefaultNetWork := this.GetStrings("defaultNetWork")
		arrSize := this.GetStrings("size")

		resourcesPoolsMap = make([]entity.ResourcesPools, 0)

		for index, value := range arrName {
			size, _ := strconv.Atoi(arrSize[index])

			if size <= 0 {
				size = 1
			}

			addResourcesPool := entity.NewResourcesPools(value,
				arrInstanceType[index],
				arrAvailabilityZone[index],
				arrDefaultNetWork[index],
				size,
			)

			if index == 0 {
				resourcesPool = addResourcesPool
			}
			resourcesPoolsMap = append(resourcesPoolsMap, addResourcesPool)
		}
		this.CommitData(resourcesPoolsMap)
	case utils.CloudFoundryJobs:
		iPFactory := utils.NewIPFactory()
		ipArr := utils.SpliteIPs(privateNetWorks.StaticIp)

		success, iperr := iPFactory.InitFactory(ipArr[0], ipArr[1])

		if iperr != nil {
			erros = append(erros, iperr)
		}
		for key, value := range cloudFoundryJobsMap {
			value.Name = this.GetString(key + "_name")
			instance, _ := this.GetInt(key+"_instances", 1)
			if instance <= 0 {
				instance = 1
			}
			value.ResourcesPool = this.GetString(key + "_resourcesPool_select")
			if success {
				assignaIP, assignaerr := iPFactory.AssignaIP2Job(key, instance)
				if assignaerr == nil {
					value.StaticIp = assignaIP
					value.Instances = instance
				} else {
					erros = append(erros, fmt.Errorf("Assign IP for Job : %s , Errors: %s", key, assignaerr))
				}
			}
			cloudFoundryJobsMap[key] = value
		}
		this.CommitData(cloudFoundryJobsMap)

		for index, value := range resourcesPoolsMap {
			poolsize := 0
			for _, v := range cloudFoundryJobsMap {
				if value.Name == v.ResourcesPool {
					poolsize = poolsize + 1*v.Instances //fixed instance sum
				}
			}
			value.Size = poolsize
			resourcesPoolsMap[index] = value
		}
		this.CommitData(resourcesPoolsMap)

	case utils.Properties:
		property := properties.JobProperties
		for key, val := range property {
			val.Name = key
			val.Value = this.GetString(key)
			property[key] = val
		}
		properties.JobProperties = property
		this.CommitData(properties)

	default:
		erros = append(erros, fmt.Errorf("Unknow model %s", model))
	}

	if len(erros) != 0 {
		this.Data["MessageErr"] = fmt.Sprintf("Errors: %s", erros)
	}
	this.Get()
}
		utils.Net_Public,
		"manual",
		"8bb21e6e-dc6a-409c-82d0-a110fb3c9fe1",
		"10.162.2.0/24",
		"",
		"",
		"",
		"10.162.2.28 - 10.162.2.29")

	netWorksMap map[string]entity.NetWorks = map[string]entity.NetWorks{
		utils.Net_Private: privateNetWorks, utils.Net_Public: publicNetWorks,
	}

	resourcesPool = entity.NewResourcesPools(
		"normal",
		"flavor_91",
		"zone2",
		"cf1",
		4)
	resourcesPool2 = entity.NewResourcesPools(
		"normal2",
		"flavor_91",
		"zone2",
		"cf1",
		4)

	resourcesPoolsMap []entity.ResourcesPools = []entity.ResourcesPools{
		resourcesPool, resourcesPool2,
	}

	properties = entity.Properties{}