Esempio n. 1
0
    def __init__(self, bigip, partition, user_agent=None, prefix=None,
                 schema_path=None):
        """Initialize an instance of the F5 CCCL service manager.

        :param bigip: BIG-IP management root.
        :param partition: Name of BIG-IP partition to manage.
        :param user_agent: String to append to the User-Agent header for
        iControl REST requests (default: None)
        :param prefix:  The prefix assigned to resources that should be
        managed by this CCCL instance.  This is prepended to the
        resource name (default: None)
        :param schema_path: User defined schema (default: from package)
        """
        LOGGER.debug("F5CloudServiceManager initialize")

        # Set user-agent for ICR session
        if user_agent is not None:
            bigip.icrs.append_user_agent(user_agent)
        self._user_agent = user_agent

        self._bigip_proxy = BigIPProxy(bigip,
                                       partition,
                                       prefix=prefix)

        if schema_path is None:
            schema_path = pkg_resources.resource_filename(resource_package,
                                                          ltm_api_schema)
        self._service_manager = ServiceManager(self._bigip_proxy,
                                               partition,
                                               schema_path)
Esempio n. 2
0
    def __init__(self, bigip, partition, prefix=None, schema_path=None):
        """Initialize an instance of the F5 CCCL service manager.

        :param bigip: BIG-IP management root.
        :param partition: Name of BIG-IP partition to manage.
        :param prefix:  The prefix assigned to resources that should be
        managed by this CCCL instance.  This is prepended to the
        resource name (default: None)
        :param schema_path: User defined schema (default: from package)
        """
        LOGGER.debug("F5CloudServiceManager initialize")
        self._bigip_proxy = BigIPProxy(bigip, partition, prefix=prefix)

        if schema_path is None:
            schema_path = pkg_resources.resource_filename(
                resource_package, api_schema)
        self._service_manager = ServiceManager(self._bigip_proxy, partition,
                                               schema_path)
Esempio n. 3
0
def bigip_proxy(bigip, partition):
    yield BigIPProxy(bigip, partition)