# Path: ssmlib/misc.py
#     def __next__(iter):
#     def __next__(iter):
#     def __str__(x):
#     def __str__(x):
# def get_unit_size(string):
# def is_number(string):
# def get_real_size(size):
# def get_perc_size_argument(string):
# def get_slaves(devname):
# def send_udev_event(device, event):
# def udev_settle():
# def get_device_by_uuid(uuid):
# def get_major_minor(device):
# def get_file_size(path):
# def check_binary(name):
# def do_mount(device, directory, options=None):
# def do_umount(mpoint, all_targets=False):
# def temp_mount(device, options=None):
# def temp_umount(mpoint=None):
# def do_cleanup():
# def get_signature(device, types=None):
# def get_fs_type(device):
# def get_real_device(device):
# def get_swaps():
# def get_partitions():
# def get_mountinfo(regex=".*"):
# def get_mounts_old(regex=".*"):
# def get_mounts(regex=".*"):
# def get_dmnumber(name):
# def udev_checkpoint(devices):
# def wipefs(devices, signatures):
# def humanize_size(arg):
# def run(cmd, show_cmd=False, stdout=False, stderr=True, can_fail=False,
#         stdin_data=None, return_stdout=True):
# def chain(*iterables):
#     def izip(*iterables):
#     def izip(*iterables):
# def compress(data, selectors):
# def permutations(iterable, r=None):
# def terminal_size(default=(25, 80)):
#     def _ioctl_GWINSZ(fd):
# def is_bdevice(path):
# def get_device_size(device):
# def ptable(data, table_header=None):
#     def __init__(self):
#     def neighbours(self):
#     def parents(self):
#     def children(self):
#     def add_neighbour(self, node):
#     def add_children(self, node):
#     def add_parent(self, node):
#     def get_roots(self):
#     def find_node(name, node_cls):
# TMP_MOUNTED = []
# VERBOSE_VV_FLAG = False
# VERBOSE_VVV_FLAG = False
# class Node(object):
# 
# Path: ssmlib/backends/template.py
#     SSM_TEMPLATE_DEFAULT_POOL = os.environ['SSM_TEMPLATE_DEFAULT_POOL']
#     SSM_TEMPLATE_DEFAULT_POOL = "template_pool"
# class Backend(object):
# class BackendPool(Backend):
# class BackendVolume(Backend):
# class BackendDevice(Backend):
#     def __init__(self, options, data=None):
#     def __str__(self):
#     def __iter__(self):
#     def __getitem__(self, key):
#     def __init__(self, *args, **kwargs):
#     def reduce(self, pool, device):
#     def new(self, pool, devices):
#     def extend(self, pool, devices):
#     def remove(self, pool):
#     def create(self, pool, size=None, name=None, devs=None,
#                options=None):
#     def migrate(self, pool, sources, targets=None):
#     def __init__(self, *args, **kwargs):
#     def remove(self, volume):
#     def resize(self, volume, size, resize_fs=True):
#     def __init__(self, *args, **kwargs):
#     def remove(self, devices):


import os
import socket
from ssmlib import misc
from ssmlib.backends import template
# (C)2012 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# md module for System Storage Manager


try:
    SSM_DM_DEFAULT_POOL = os.environ['SSM_DM_DEFAULT_POOL']
except KeyError:
    SSM_DM_DEFAULT_POOL = "md"

MDADM = "mdadm"



# Path: ssmlib/misc.py
#     def __next__(iter):
#     def __next__(iter):
#     def __str__(x):
#     def __str__(x):
# def get_unit_size(string):
# def is_number(string):
# def get_real_size(size):
# def get_perc_size_argument(string):
# def get_slaves(devname):
# def send_udev_event(device, event):
# def udev_settle():
# def get_device_by_uuid(uuid):
# def get_major_minor(device):
# def get_file_size(path):
# def check_binary(name):
# def do_mount(device, directory, options=None):
# def do_umount(mpoint, all_targets=False):
# def temp_mount(device, options=None):
# def temp_umount(mpoint=None):
# def do_cleanup():
# def get_signature(device, types=None):
# def get_fs_type(device):
# def get_real_device(device):
# def get_swaps():
# def get_partitions():
# def get_mountinfo(regex=".*"):
# def get_mounts_old(regex=".*"):
# def get_mounts(regex=".*"):
# def get_dmnumber(name):
# def udev_checkpoint(devices):
# def wipefs(devices, signatures):
# def humanize_size(arg):
# def run(cmd, show_cmd=False, stdout=False, stderr=True, can_fail=False,
#         stdin_data=None, return_stdout=True):
# def chain(*iterables):
#     def izip(*iterables):
#     def izip(*iterables):
# def compress(data, selectors):
# def permutations(iterable, r=None):
# def terminal_size(default=(25, 80)):
#     def _ioctl_GWINSZ(fd):
# def is_bdevice(path):
# def get_device_size(device):
# def ptable(data, table_header=None):
#     def __init__(self):
#     def neighbours(self):
#     def parents(self):
#     def children(self):
#     def add_neighbour(self, node):
#     def add_children(self, node):
#     def add_parent(self, node):
#     def get_roots(self):
#     def find_node(name, node_cls):
# TMP_MOUNTED = []
# VERBOSE_VV_FLAG = False
# VERBOSE_VVV_FLAG = False
# class Node(object):
# 
# Path: ssmlib/backends/template.py
#     SSM_TEMPLATE_DEFAULT_POOL = os.environ['SSM_TEMPLATE_DEFAULT_POOL']
#     SSM_TEMPLATE_DEFAULT_POOL = "template_pool"
# class Backend(object):
# class BackendPool(Backend):
# class BackendVolume(Backend):
# class BackendDevice(Backend):
#     def __init__(self, options, data=None):
#     def __str__(self):
#     def __iter__(self):
#     def __getitem__(self, key):
#     def __init__(self, *args, **kwargs):
#     def reduce(self, pool, device):
#     def new(self, pool, devices):
#     def extend(self, pool, devices):
#     def remove(self, pool):
#     def create(self, pool, size=None, name=None, devs=None,
#                options=None):
#     def migrate(self, pool, sources, targets=None):
#     def __init__(self, *args, **kwargs):
#     def remove(self, volume):
#     def resize(self, volume, size, resize_fs=True):
#     def __init__(self, *args, **kwargs):
#     def remove(self, devices):


# Path: ssmlib/backends/md.py
import os
import socket
from ssmlib import misc
from ssmlib.backends import template

# (C)2012 Red Hat, Inc., Lukas Czerner <lczerner@redhat.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# md module for System Storage Manager


try:
    SSM_DM_DEFAULT_POOL = os.environ['SSM_DM_DEFAULT_POOL']
except KeyError:
    SSM_DM_DEFAULT_POOL = "md"

MDADM = "mdadm"



class MdRaid(template.Backend):