def parseConfigFile(configFilePath):
try:<EOL><INDENT>with open(configFilePath) as f:<EOL><INDENT>data = yaml.load(f)<EOL><DEDENT><DEDENT>except (OSError, IOError) as e:<EOL><INDENT>reason = "<STR_LIT>" % (configFilePath, e)<EOL>raise ConfigurationException(reason)<EOL><DEDENT>if "<STR_LIT>" in data and "<STR_LIT>" in data["<STR_LIT>"]:<EOL><INDENT>if data["<STR_LIT>"]["<STR_LIT>"] not in ["<STR_LIT:error>", "<STR_LIT>", "<STR_LIT:info>", "<STR_LIT>"]:<EOL><INDENT>raise ConfigurationException("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>data["<STR_LIT>"]["<STR_LIT>"] = logging.getLevelName(data["<STR_LIT>"]["<STR_LIT>"].upper())<EOL><DEDENT><DEDENT>return data<EOL>
Parse a yaml configuration file into a Python dictionary suitable for passing to the 
device client constructor as the `options` parameter

# Example Configuration File

identity:
  appId: myApp
auth:
  key: a-23gh56-sdsdajhjnee
  token: Ab$76s)asj8_s5
options:
  domain: internetofthings.ibmcloud.com
  logLevel: error|warning|info|debug
  mqtt:
    port: 8883
    transport: tcp
    cleanStart: false
    sessionExpiry: 3600
    keepAlive: 60
    sharedSubscription: false
    caFile: /path/to/certificateAuthorityFile.pem
  http:
    verify: true