Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/quotas/management/commands/reconcile-resources-cyclades.py   synnefo(Download)
 
        # Get holdings from Cyclades DB
        db_holdings = util.get_db_holdings(userid, project)
        db_project_holdings = util.get_db_project_holdings(project)
 

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/quotas/tests.py   synnefo(Download)
    def test_no_holdings(self):
        holdings = util.get_db_holdings(user=None)
        self.assertEqual(holdings, {})
 
    def test_vm_holdings(self):
                                          "cyclades.total_ram": 8192 << 20,
                                          "cyclades.ram": 8192 << 20}}}
        holdings = util.get_db_holdings(user="user1")
        self.assertEqual(holdings, user_holdings)
        holdings = util.get_db_holdings()
                                          "cyclades.total_ram": 8192 << 20,
                                          "cyclades.ram": 8192 << 20}}}
        holdings = util.get_db_holdings(user="user2")
        self.assertEqual(holdings, user_holdings)
        mfactory.VirtualMachineFactory(flavor=flavor, userid="user3",
                                       operstate="STOPPED")
        user_holdings = {"user3": {None: {"cyclades.vm": 1,
                                   "cyclades.total_cpu": 24,
                                   "cyclades.total_ram": 8589934592}}}
        holdings = util.get_db_holdings(user="user3")