module_utils/ca_common.py
def generate_ceph_cmd(sub_cmd, args, user_key=None, cluster='ceph', user='client.admin', container_image=None, interactive=False):
    '''
    Generate 'ceph' command line to execute
    '''

    if not user_key:
        user_key = '/etc/ceph/{}.{}.keyring'.format(cluster, user)

    cmd = pre_generate_ceph_cmd(container_image=container_image, interactive=interactive)

    base_cmd = [
        '-n',
        user,
        '-k',
        user_key,
        '--cluster',
        cluster
    ]
    base_cmd.extend(sub_cmd)
    cmd.extend(base_cmd + args)

    return cmd

    Generate 'ceph' command line to execute
    
Generate 'ceph' command line to execute
Generate ' ceph ' command line to execute
def generate_ceph_cmd(sub_cmd, args, user_key=None, cluster='ceph', user='client.admin', container_image=None, interactive=False):
    if not user_key:
        user_key = '/etc/ceph/{}.{}.keyring'.format(cluster, user)
    cmd = pre_generate_ceph_cmd(container_image=container_image, interactive=interactive)
    base_cmd = [
        '-n',
        user,
        '-k',
        user_key,
        '--cluster',
        cluster
    ]
    base_cmd.extend(sub_cmd)
    cmd.extend(base_cmd + args)
    return cmd
def generate_ceph_cmd ( sub_cmd , args , user_key = None , cluster = 'ceph' , user = 'client.admin' , container_image = None , interactive = False ) : if not user_key : user_key = '/etc/ceph/{}.{}.keyring' . format ( cluster , user ) cmd = pre_generate_ceph_cmd ( container_image = container_image , interactive = interactive ) base_cmd = [ '-n' , user , '-k' , user_key , '--cluster' , cluster ] base_cmd . extend ( sub_cmd ) cmd . extend ( base_cmd + args ) return cmd
Generate 'ceph' command line to execute
Generate ' ceph ' command line to execute
'''
    Generate 'ceph' command line to execute
    '''
sub_cmd
args
user_key
cluster
user
container_image
interactive