c98a17222f
RHEL 7 does not ship tgtadm or tgtd so they cannot be used in the deploy ramdisk. This change separates the tgt-specific parts of the ramdisk into their own element, and adds a new one that supports targetcli instead. For now, the tgt implementation can only be used with traditional busybox ramdisks and the targetcli one can only be used with dracut. This is because dracut is primarily used for RHEL right now so it makes sense to keep the dependencies simple. If there is a future desire to mix and match the implementations that could be done, but it would require users to explicitly select between tgt and targetcli. Change-Id: I4f99c91016287e08d836095c2f2261de8b45abdc Co-Authored-By: James Slagle <jslagle@redhat.com>
31 lines
911 B
Python
Executable file
31 lines
911 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
# Copyright 2014 Red Hat, Inc.
|
|
#
|
|
# 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.
|
|
|
|
import rtslib
|
|
|
|
import targetcli_bin
|
|
|
|
|
|
class MyISCSIFabricModule(rtslib.fabric.ISCSIFabricModule):
|
|
def __init__(self):
|
|
super(rtslib.fabric.ISCSIFabricModule, self).__init__('iscsi')
|
|
self.wwn_types = ('free',)
|
|
|
|
|
|
rtslib.fabric.fabric_modules['iscsi'] = MyISCSIFabricModule
|
|
|
|
|
|
targetcli_bin.main()
|