@staticmethod
def get_broker_credentials(cloudify_agent):
    """Get broker credentials or their defaults if not set."""
    default_user = 'guest'
    default_pass = 'guest'
    default_vhost = '/'
    try:
        broker_user = cloudify_agent.broker_user or default_user
        broker_pass = cloudify_agent.broker_pass or default_pass
        broker_vhost = cloudify_agent.broker_vhost or default_vhost
    except AttributeError:
        broker_user = default_user
        broker_pass = default_pass
        broker_vhost = default_vhost
    return broker_user, broker_pass, broker_vhost
