examples/collect_config_files.py
def collect_config_file_versions(spc, cf, output_dir):
    """
    Collect all versions for a given file
    """
    print("Collecting file versions for device: ", cf.deviceName)
    device_path_name = '/'.join([output_dir, str(cf.deviceName)])

    versions = cf.config_file_versions.get()
    for v in versions:
        version_path_name = '/'.join([device_path_name,
                                      str(v.versionId)])
        if os.path.exists(os.path.abspath(version_path_name)):
            continue # We already have stored this version

        cfv = v.get()
        store_version(version_path_name, cfv)

    return cf.deviceName

    Collect all versions for a given file
    
Collect all versions for a given file
Collect all versions for a given file
def collect_config_file_versions(spc, cf, output_dir):
    print("Collecting file versions for device: ", cf.deviceName)
    device_path_name = '/'.join([output_dir, str(cf.deviceName)])
    versions = cf.config_file_versions.get()
    for v in versions:
        version_path_name = '/'.join([device_path_name,
                                      str(v.versionId)])
        if os.path.exists(os.path.abspath(version_path_name)):
            continue 
        cfv = v.get()
        store_version(version_path_name, cfv)
    return cf.deviceName
def collect_config_file_versions ( spc , cf , output_dir ) : print ( "Collecting file versions for device: " , cf . deviceName ) device_path_name = '/' . join ( [ output_dir , str ( cf . deviceName ) ] ) versions = cf . config_file_versions . get ( ) for v in versions : version_path_name = '/' . join ( [ device_path_name , str ( v . versionId ) ] ) if os . path . exists ( os . path . abspath ( version_path_name ) ) : continue cfv = v . get ( ) store_version ( version_path_name , cfv ) return cf . deviceName
Collect all versions for a given file
Collect all versions for a given file
"""
    Collect all versions for a given file
    """ # We already have stored this version
spc
cf
output_dir