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()
}
		cidr := "10.10.10.0/24"
		ip := "10.10.10.24"
		fmt.Println(utils.CheckCIDRContainsIP(cidr, ip))
	})
	It("parse static i p", func() {

		start := "192.168.133.108"
		end := "192.168.133.120"
		ips := utils.ParseStaticIP(start, end)

		fmt.Println(ips)
	})
	It("ass ip", func() {

		iPFactory := utils.NewIPFactory()
		iPFactory.InitFactory("192.168.1.1", "192.168.1.20")

		fmt.Println("iiiiiiiiiiiiiiiiii")
		fmt.Printf("%s", iPFactory.GetAssignaIP4Job(utils.Job_Cloud_Controller_Clock))
		fmt.Println()
		abs, e := iPFactory.AssignaIP2Job(utils.Job_Cloud_Controller_Clock, 2)
		fmt.Printf("AssignaIP %s , %s", abs, e)
		fmt.Println()
		fmt.Printf("%s", iPFactory.GetAssignaIP4Job(utils.Job_Cloud_Controller_Clock))
		fmt.Println()

		iPFactory.AssignaIP2Job(utils.Job_Cloud_Controller_Clock, 3)

		fmt.Printf("%s", iPFactory.GetAssignaIP4Job(utils.Job_Cloud_Controller_Clock))
		fmt.Println()