Beispiel #1
0
def query_classsoft_price(db, paras):
    pricing = PricingResult(db)

    pricing.paras = paras
    pricing.type = PRICING_TYPE_OCTCLASS_SOFT
    pricing.name = paras["name"] + "-报价-" + getCurrentStrDate()
    pricing.desc = paras["desc"]

    pricing.points = paras["point"]
    pricing.pricing_software(SOFTWARE_TYPE_OCTCLASS)

    ret = pricing.add()

    return ret, pricing.toObj()
Beispiel #2
0
def query_platformsoft_price(db, paras):
    pricing = PricingResult(db)

    pricing.paras = paras
    pricing.type = PRICING_TYPE_PLATFORM_SOFT
    pricing.name = paras["name"] + "-报价-" + getCurrentStrDate()
    pricing.desc = paras["desc"]

    pricing.cpuCount = paras["cpuCount"]
    pricing.hostCount = paras["hostCount"]

    pricing.pricing_software(SOFTWARE_TYPE_PLATFORM)

    ret = pricing.add()

    return ret, pricing.toObj()