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

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/api/servers.py   synnefo(Download)
        d['user_id'] = vm.userid
        d['tenant_id'] = vm.project
        d['status'] = logic_utils.get_rsapi_state(vm)
        d['SNF:task_state'] = logic_utils.get_task_state(vm)
        d['progress'] = 100 if d['status'] == 'ACTIVE' else vm.buildpercentage

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/api/tests/servers.py   synnefo(Download)
                               IPAddress, NetworkInterface, Volume)
from synnefo.db import models_factory as mfactory
from synnefo.logic.utils import get_rsapi_state
from synnefo.cyclades_settings import cyclades_services
from synnefo.lib.services import get_service_path
            self.assertEqual(api_vm['image']["id"], db_vm.imageid)
            self.assertEqual(api_vm['name'], db_vm.name)
            self.assertEqual(api_vm['status'], get_rsapi_state(db_vm))
            self.assertSuccess(response)
 
        self.assertEqual(server['image']["id"], db_vm.imageid)
        self.assertEqual(server['name'], db_vm.name)
        self.assertEqual(server['status'], get_rsapi_state(db_vm))
        api_nic = server['attachments'][0]
        self.assertEqual(api_nic['network_id'], str(net.id))