20. Layer python2

20.1. Overview

The layer1_python2 layer includes Python2 MFDATA packages.

It is included in the .layerapi2_dependencies file of the plugin when you choose python2 during the creation of a plugin.

You may also manually include this dependencies (i.e. Label) in the .layerapi2_dependencies file.

20.2. Metadata

20.2.1. Layer Home

/opt/metwork-mfdata-0.8/opt/python2

20.2.2. Label

python2@mfdata

20.2.3. Dependencies

20.3. Utilities

20.3.1. inject_file

usage: Inject a file into a plugin/step [-h] [--plugin PLUGIN] [--step STEP]
                                        [--move] [--random-basename]
                                        [--incoming]
                                        filepath

positional arguments:
  filepath           filepath to inject

optional arguments:
  -h, --help         show this help message and exit
  --plugin PLUGIN    plugin name (default :switch)
  --step STEP        step name (default: main)
  --move             move the file instead of copying it (default: copy)
  --random-basename  use a random basename for copying/moving the file
                     (default: keep the original basename)
  --incoming         ignore plugin and step parameter and inject the file into
                     the first configured directory listened by the switch
                     plugin

20.3.3. get_tag

usage: get_tag [-h] filepath name

get an attribute on a given file

positional arguments:
  filepath    Path of the file of which you want to print tags
  name        name of the tag

optional arguments:
  -h, --help  show this help message and exit

20.3.4. set_tag

usage: set_tag [-h] filepath name value

set an attribute on a given file

positional arguments:
  filepath    Path of the file of which you want to print tags
  name        name of the tag
  value       value of the tag

optional arguments:
  -h, --help  show this help message and exit