Exemplo n.º 1
0
 def get_broker_configuration(agent):
     client = CloudifyClient(
         agent['manager_ip'],
         agent['manager_port'],
     )
     bootstrap_context_dict = client.manager.get_context()
     bootstrap_context_dict = bootstrap_context_dict['context']['cloudify']
     bootstrap_context = BootstrapContext(bootstrap_context_dict)
     attributes = bootstrap_context.broker_config(
         fallback_to_manager_ip=False)
     if not attributes.get('broker_ip'):
         attributes['broker_ip'] = agent['manager_ip']
     return attributes
Exemplo n.º 2
0
 def get_broker_configuration(agent):
     client = CloudifyClient(
         agent['manager_ip'],
         agent['manager_port'],
     )
     bootstrap_context_dict = client.manager.get_context()
     bootstrap_context_dict = bootstrap_context_dict['context']['cloudify']
     bootstrap_context = BootstrapContext(bootstrap_context_dict)
     attributes = bootstrap_context.broker_config(
         fallback_to_manager_ip=False)
     if not attributes.get('broker_ip'):
         attributes['broker_ip'] = agent['manager_ip']
     return attributes
Exemplo n.º 3
0
    def get_broker_configuration(agent):

        client = get_rest_client(
            rest_host=agent['rest_host'],
            rest_port=agent['rest_port'],
            rest_token=agent['rest_token'],
            rest_tenant=agent['rest_tenant'],
            ssl_cert_path=agent['local_rest_cert_file'],
            bypass_maintenance_mode=agent['bypass_maintenance_mode'])

        bootstrap_context_dict = client.manager.get_context()
        bootstrap_context_dict = bootstrap_context_dict['context']['cloudify']
        bootstrap_context = BootstrapContext(bootstrap_context_dict)
        attributes = bootstrap_context.broker_config()
        return attributes
Exemplo n.º 4
0
    def get_broker_configuration(agent):

        client = get_rest_client(
            security_enabled=agent['security_enabled'],
            rest_host=agent['rest_host'],
            rest_protocol=agent['rest_protocol'],
            rest_port=agent['rest_port'],
            rest_username=agent['rest_username'],
            rest_password=agent['rest_password'],
            rest_token=agent['rest_token'],
            verify_rest_certificate=agent['verify_rest_certificate'],
            ssl_cert_path=agent['local_rest_cert_file'],
            bypass_maintenance_mode=agent['bypass_maintenance_mode'])

        bootstrap_context_dict = client.manager.get_context()
        bootstrap_context_dict = bootstrap_context_dict['context']['cloudify']
        bootstrap_context = BootstrapContext(bootstrap_context_dict)
        attributes = bootstrap_context.broker_config()
        return attributes