53c1794b59
This is an import of the Ironic scheduler changes as of commit da967d77894be6f23d81fb5cc948f9d13898ba84 implements bp: add-ironic-driver Co-authored-by: Adam Gandelman <adamg@ubuntu.com> Co-authored-by: ChangBo Guo(gcb) <eric.guo@easystack.cn> Co-authored-by: Chris Behrens <cbehrens@codestud.com> Co-authored-by: Chris Krelle <nobodycam@gmail.com> Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com> Co-authored-by: Fengqian Gao <fengqian.gao@intel.com> Co-authored-by: Hans Lindgren <hanlind@kth.se> Co-authored-by: Jenkins <jenkins@review.openstack.org> Co-authored-by: Lucas Alvares Gomes <lucasagomes@gmail.com> Co-authored-by: Michael Davies <michael@the-davies.net> Co-authored-by: Rohan Kanade <openstack@rohankanade.com> Co-authored-by: Zhongyue Luo <zhongyue.nah@intel.com> Change-Id: I358d9c0485c5dcf81498871faa9150e3bf167c6b
76 lines
3.8 KiB
Python
76 lines
3.8 KiB
Python
# Copyright 2014 OpenStack Foundation
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
"""
|
|
Fake nodes for Ironic host manager tests.
|
|
"""
|
|
|
|
from nova.openstack.common import jsonutils
|
|
|
|
|
|
COMPUTE_NODES = [
|
|
dict(id=1, local_gb=10, memory_mb=1024, vcpus=1,
|
|
vcpus_used=0, local_gb_used=0, memory_mb_used=0,
|
|
updated_at=None, cpu_info='baremetal cpu',
|
|
service=dict(host='host1', disabled=False),
|
|
hypervisor_hostname='node1uuid', host_ip='127.0.0.1',
|
|
hypervisor_version=1, hypervisor_type='ironic',
|
|
stats=jsonutils.dumps(dict(ironic_driver=
|
|
"nova.virt.ironic.driver.IronicDriver",
|
|
cpu_arch='i386')),
|
|
supported_instances='[["i386", "baremetal", "baremetal"]]',
|
|
free_disk_gb=10, free_ram_mb=1024),
|
|
dict(id=2, local_gb=20, memory_mb=2048, vcpus=1,
|
|
vcpus_used=0, local_gb_used=0, memory_mb_used=0,
|
|
updated_at=None, cpu_info='baremetal cpu',
|
|
service=dict(host='host2', disabled=True),
|
|
hypervisor_hostname='node2uuid', host_ip='127.0.0.1',
|
|
hypervisor_version=1, hypervisor_type='ironic',
|
|
stats=jsonutils.dumps(dict(ironic_driver=
|
|
"nova.virt.ironic.driver.IronicDriver",
|
|
cpu_arch='i386')),
|
|
supported_instances='[["i386", "baremetal", "baremetal"]]',
|
|
free_disk_gb=20, free_ram_mb=2048),
|
|
dict(id=3, local_gb=30, memory_mb=3072, vcpus=1,
|
|
vcpus_used=0, local_gb_used=0, memory_mb_used=0,
|
|
updated_at=None, cpu_info='baremetal cpu',
|
|
service=dict(host='host3', disabled=False),
|
|
hypervisor_hostname='node3uuid', host_ip='127.0.0.1',
|
|
hypervisor_version=1, hypervisor_type='ironic',
|
|
stats=jsonutils.dumps(dict(ironic_driver=
|
|
"nova.virt.ironic.driver.IronicDriver",
|
|
cpu_arch='i386')),
|
|
supported_instances='[["i386", "baremetal", "baremetal"]]',
|
|
free_disk_gb=30, free_ram_mb=3072),
|
|
dict(id=4, local_gb=40, memory_mb=4096, vcpus=1,
|
|
vcpus_used=0, local_gb_used=0, memory_mb_used=0,
|
|
updated_at=None, cpu_info='baremetal cpu',
|
|
service=dict(host='host4', disabled=False),
|
|
hypervisor_hostname='node4uuid', host_ip='127.0.0.1',
|
|
hypervisor_version=1, hypervisor_type='ironic',
|
|
stats=jsonutils.dumps(dict(ironic_driver=
|
|
"nova.virt.ironic.driver.IronicDriver",
|
|
cpu_arch='i386')),
|
|
supported_instances='[["i386", "baremetal", "baremetal"]]',
|
|
free_disk_gb=40, free_ram_mb=4096),
|
|
# Broken entry
|
|
dict(id=5, local_gb=50, memory_mb=5120, vcpus=1, service=None,
|
|
cpu_info='baremetal cpu',
|
|
stats=jsonutils.dumps(dict(ironic_driver=
|
|
"nova.virt.ironic.driver.IronicDriver",
|
|
cpu_arch='i386')),
|
|
supported_instances='[["i386", "baremetal", "baremetal"]]',
|
|
free_disk_gb=50, free_ram_mb=5120),
|
|
]
|