コード例 #1
0
ファイル: resource_tracker.py プロジェクト: zhouronghua/nova
 def __init__(self, host, driver):
     self.host = host
     self.driver = driver
     self.pci_tracker = None
     # Dict of objects.ComputeNode objects, keyed by nodename
     self.compute_nodes = {}
     self.stats = stats.Stats()
     self.tracked_instances = {}
     self.tracked_migrations = {}
     monitor_handler = monitors.MonitorHandler(self)
     self.monitors = monitor_handler.monitors
     self.old_resources = collections.defaultdict(objects.ComputeNode)
     self.scheduler_client = scheduler_client.SchedulerClient()
     self.ram_allocation_ratio = CONF.ram_allocation_ratio
     self.cpu_allocation_ratio = CONF.cpu_allocation_ratio
     self.disk_allocation_ratio = CONF.disk_allocation_ratio
コード例 #2
0
 def __init__(self, host, driver, nodename):
     self.host = host
     self.driver = driver
     self.pci_tracker = None
     self.nodename = nodename
     self.compute_node = None
     self.stats = stats.Stats()
     self.tracked_instances = {}
     self.tracked_migrations = {}
     monitor_handler = monitors.MonitorHandler(self)
     self.monitors = monitor_handler.monitors
     self.old_resources = objects.ComputeNode()
     self.scheduler_client = scheduler_client.SchedulerClient()
     self.ram_allocation_ratio = CONF.ram_allocation_ratio
     self.cpu_allocation_ratio = CONF.cpu_allocation_ratio
     self.disk_allocation_ratio = CONF.disk_allocation_ratio
コード例 #3
0
ファイル: test_stats.py プロジェクト: zestrada/nova-cs498cc
 def setUp(self):
     super(StatsTestCase, self).setUp()
     self.stats = stats.Stats()