def define_profile_template(
                            srv,
                            name,
                            desc,
                            sp_desc,
                            server_hwt,
                            enc_group,
                            affinity,
                            hide_flexnics,
                            conn_list,
                            fw_settings,
                            boot,
                            bootmode):
    
    if conn_list:
        # read connection list from file
        conn = json.loads(open(conn_list).read())
    else:
        conn = []
       
    profile_template = srv.create_server_profile_template(
                                              name=name,
                                              description=desc,
                                              serverProfileDescription=sp_desc,
                                              serverHardwareTypeUri=server_hwt,
                                              enclosureGroupUri=enc_group,
                                              affinity=affinity,
                                              hideUnusedFlexNics=hide_flexnics,
                                              profileConnectionV4=conn,
                                              firmwareSettingsV3=fw_settings,
                                              bootSettings=boot,
                                              bootModeSetting=bootmode)

    if 'serialNumberType' in profile_template:
        print('\n\nName:                ', profile_template['name'])
        print('Type:                ', profile_template['type'])
        print('Description:         ', profile_template['description'])        
        print('serialNumberType:    ', profile_template['serialNumberType'])
        print('Connections:')
        for connection in profile_template['connections']:
            print('  name:          ', connection['name'])
            print('  functionType:  ', connection['functionType'])
            print('  networkUri:    ', connection['networkUri'])
        print('Firmware:')
        print('  manageFirmware:       ', profile_template['firmware']['manageFirmware'])
        print('  forceInstallFirmware: ', profile_template['firmware']['forceInstallFirmware'])
        print('  firmwareBaselineUri:  ', profile_template['firmware']['firmwareBaselineUri'])
        print('Bios:')
        print('  manageBios:         ', profile_template['bios']['manageBios'])
        print('  overriddenSettings: ', profile_template['bios']['overriddenSettings'])
        print('Boot:')
        print('  manageBoot:         ', profile_template['boot']['manageBoot'])
        print('  order:              ', profile_template['boot']['order'], '\n')
    else:
        pprint(profile_template)
dataset/ETHPy150Open HewlettPackard/python-hpOneView/examples/scripts/define-profile-template.py/define_profile_template/original