Example #1
0
def main():
    print('VOLUME DRIVERS')
    print('==============')
    print_drivers(util.get_volume_drivers(), 'volume_driver')

    print('BACKUP DRIVERS')
    print('==============')
    print_drivers(util.get_backup_drivers(), 'backup_driver')

    print('FC ZONE MANAGER DRIVERS')
    print('=======================')
    print_drivers(util.get_fczm_drivers(), 'zone_driver')
Example #2
0
def output_str(cinder_root, args):
    with Output(cinder_root, args.output_list) as output:
        output.write('Volume Drivers')
        output.write('==============')
        print_drivers(util.get_volume_drivers(), 'volume_driver', output)

        output.write('Backup Drivers')
        output.write('==============')
        print_drivers(util.get_backup_drivers(), 'backup_driver', output)

        output.write('FC Zone Manager Drivers')
        output.write('=======================')
        print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
Example #3
0
def output_str(cinder_root, args):
    with Output(cinder_root, args.output_list) as output:
        output.write('Volume Drivers')
        output.write('==============')
        print_drivers(util.get_volume_drivers(), 'volume_driver', output)

        output.write('Backup Drivers')
        output.write('==============')
        print_drivers(util.get_backup_drivers(), 'backup_driver', output)

        output.write('FC Zone Manager Drivers')
        output.write('=======================')
        print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
Example #4
0
def main():
    tools_dir = os.path.dirname(os.path.abspath(__file__))
    cinder_root = os.path.dirname(tools_dir)
    cur_dir = os.getcwd()
    os.chdir(cinder_root)

    try:
        print('VOLUME DRIVERS')
        print('==============')
        print_drivers(util.get_volume_drivers(), 'volume_driver')

        print('BACKUP DRIVERS')
        print('==============')
        print_drivers(util.get_backup_drivers(), 'backup_driver')

        print('FC ZONE MANAGER DRIVERS')
        print('=======================')
        print_drivers(util.get_fczm_drivers(), 'zone_driver')
    finally:
        os.chdir(cur_dir)
Example #5
0
def main():
    tools_dir = os.path.dirname(os.path.abspath(__file__))
    cinder_root = os.path.dirname(tools_dir)
    cur_dir = os.getcwd()
    os.chdir(cinder_root)

    try:
        with Output(cinder_root) as output:
            output.write('Volume Drivers')
            output.write('==============')
            print_drivers(util.get_volume_drivers(), 'volume_driver', output)

            output.write('Backup Drivers')
            output.write('==============')
            print_drivers(util.get_backup_drivers(), 'backup_driver', output)

            output.write('FC Zone Manager Drivers')
            output.write('=======================')
            print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
    finally:
        os.chdir(cur_dir)
def main():
    tools_dir = os.path.dirname(os.path.abspath(__file__))
    cinder_root = os.path.dirname(tools_dir)
    cur_dir = os.getcwd()
    os.chdir(cinder_root)

    try:
        with Output(cinder_root) as output:
            output.write('Volume Drivers')
            output.write('==============')
            print_drivers(util.get_volume_drivers(), 'volume_driver', output)

            output.write('Backup Drivers')
            output.write('==============')
            print_drivers(util.get_backup_drivers(), 'backup_driver', output)

            output.write('FC Zone Manager Drivers')
            output.write('=======================')
            print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
    finally:
        os.chdir(cur_dir)
Example #7
0
def output_str(cinder_root, args):
    with Output(cinder_root, args.output_list) as output:
        output.write('Volume Drivers')
        output.write('==============')
        supported_drivers, unsupported_drivers = filter_drivers(
            util.get_volume_drivers())

        output.write('Supported Drivers')
        output.write('-----------------')
        output.write('')
        print_drivers(supported_drivers, 'volume_driver', output, '~')

        output.write('Unsupported Drivers')
        output.write('-------------------')
        output.write('')
        print_drivers(unsupported_drivers, 'volume_driver', output, '~')

        output.write('Backup Drivers')
        output.write('==============')
        print_drivers(util.get_backup_drivers(), 'backup_driver', output)

        output.write('FC Zone Manager Drivers')
        output.write('=======================')
        print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
Example #8
0
def output_str(cinder_root, args):
    with Output(cinder_root, args.output_list) as output:
        output.write('Volume Drivers')
        output.write('==============')
        supported_drivers, unsupported_drivers = filter_drivers(
            util.get_volume_drivers())

        output.write('Supported Drivers')
        output.write('-----------------')
        output.write('')
        print_drivers(supported_drivers, 'volume_driver', output, '~')

        output.write('Unsupported Drivers')
        output.write('-------------------')
        output.write('')
        print_drivers(unsupported_drivers, 'volume_driver', output, '~')

        output.write('Backup Drivers')
        output.write('==============')
        print_drivers(util.get_backup_drivers(), 'backup_driver', output)

        output.write('FC Zone Manager Drivers')
        output.write('=======================')
        print_drivers(util.get_fczm_drivers(), 'zone_driver', output)
Example #9
0
#         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.
#

import ddt

from cinder.interface import fczm_driver
from cinder.interface import util
from cinder import test

FCZM_DRIVERS = util.get_fczm_drivers()


@ddt.ddt
class TestFibreChannelZoneManagerDrivers(test.TestCase):

    def test_fczm_driver_decorator(self):
        """Sanity check on the decorator.

        The interface code is somewhat implicitly tested. We don't need unit
        tests for all of that code, but as a minimum we should make sure it
        returns at least one registered driver, else the compliance test will
        never even run.
        """
        self.assertGreater(len(FCZM_DRIVERS), 0)
Example #10
0
 def test_get_fczm_drivers(self):
     # Just ensure that it doesn't raise an exception
     drivers = util.get_fczm_drivers()
     self.assertNotEqual(0, len(drivers))
     for driver in drivers:
         self.assertIsInstance(driver, util.DriverInfo)
Example #11
0
#         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.
#

import ddt

from cinder.interface import fczm_driver
from cinder.interface import util
from cinder import test

FCZM_DRIVERS = util.get_fczm_drivers()


@ddt.ddt
class TestFibreChannelZoneManagerDrivers(test.TestCase):
    def test_fczm_driver_decorator(self):
        """Sanity check on the decorator.

        The interface code is somewhat implicitly tested. We don't need unit
        tests for all of that code, but as a minimum we should make sure it
        returns at least one registered driver, else the compliance test will
        never even run.
        """
        self.assertTrue(len(FCZM_DRIVERS) > 0)

    @ddt.data(*FCZM_DRIVERS)