diff options
author | Frank Brockners <fbrockne@cisco.com> | 2015-04-03 07:17:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-04-03 07:17:19 +0000 |
commit | 2797591c64423a62522f5f7e667422c5434229b2 (patch) | |
tree | b636a5d21a6e564abe3b070ac91397c005d093f0 /fuel/deploy/dha.py | |
parent | d65c837590e55abb168af92e52ae199ba183df5c (diff) | |
parent | 1e066de62f2b4bcc833ce62a16efdcbf71d3dd9b (diff) |
Merge "Automatic Deployment - Deployment Hardware Adapter - Deployment Environment Adapter - Fuel environment cleanup - Fuel environment configuration"
Diffstat (limited to 'fuel/deploy/dha.py')
-rw-r--r-- | fuel/deploy/dha.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/fuel/deploy/dha.py b/fuel/deploy/dha.py new file mode 100644 index 0000000..f78686b --- /dev/null +++ b/fuel/deploy/dha.py @@ -0,0 +1,49 @@ + +class DeploymentHardwareAdapter(object): + def __new__(cls, server_type): + if cls is DeploymentHardwareAdapter: + if server_type == 'esxi': return EsxiAdapter() + if server_type == 'hp': return HpAdapter() + if server_type == 'dell': return DellAdapter() + if server_type == 'libvirt': return LibvirtAdapter() + return super(DeploymentHardwareAdapter, cls).__new__(cls) + + +class HardwareAdapter(object): + + def power_off_blades(self): + raise NotImplementedError + + def power_on_blades(self): + raise NotImplementedError + + def power_cycle_blade(self): + raise NotImplementedError + + def set_boot_order(self): + raise NotImplementedError + + def reset_to_factory_defaults(self): + raise NotImplementedError + + def configure_networking(self): + raise NotImplementedError + + def get_blade_mac_addresses(self, shelf_id, blade_id): + raise NotImplementedError + + def get_blade_hardware_info(self, shelf_id, blade_id): + raise NotImplementedError + + +class EsxiAdapter(HardwareAdapter): + pass + +class LibvirtAdapter(HardwareAdapter): + pass + +class HpAdapter(HardwareAdapter): + pass + +class DellAdapter(HardwareAdapter): + pass |