Exemple #1
0
  def create_link(self, name='test1', connector_id=1):
    link = Link(name, connector_id)
    link.linkConfig = self.client.get_connectors()[0].link_config

    for _config in link.linkConfig:
      for _input in _config.inputs:
        if _input.name not in LINK_CONFIG_VALUES:
          LOG.warning("Link config input mapping %s does not exist. Maybe it's new?" % _input.name)
        elif LINK_CONFIG_VALUES[_input.name]:
          _input.value = LINK_CONFIG_VALUES[_input.name]

    return self.client.create_link(link)