Example #1
0
def attach(domain=None, location=None, connectDomainEvents=True):
    """
    Attach to a Domain and return a reference to the Domain.

    Arguments
      domain   - Name of domain. If there is only one domain, passing None
                 will connect to that domain.
      location - Location of naming service to look up domain. If None, use
                 the default NameService initial reference.
      connectDomainEvents - If True, connect to the IDM and ODM channels for
                            domain state updates (default: True).
    """
    if domain == None:
        domains = scan(location)
        if len(domains) == 1:
            domain = domains[0]
        else:
            print "Multiple domains found: " + str(
                domains) + ". Please specify one."
            return None

    dom_entry = _core.Domain(name=str(domain),
                             location=location,
                             connectDomainEvents=connectDomainEvents)

    return dom_entry
Example #2
0
def attach(domain=None, location=None):
    """
        Attach to a Domain and return a reference
        to the Domain.
    """
    if domain == None:
        return None

    dom_entry = _core.Domain(name=domain,
                             int_list=_interface_list,
                             location=location)

    return dom_entry
Example #3
0
def attach(domain=None, location=None):
    """
        Attach to a Domain and return a reference
        to the Domain.
    """
    if domain == None:
        domains = scan(location)
        if len(domains) == 1:
            domain = domains[0]
        else:
            print "Multiple domains found: "+str(domains)+". Please specify one."
            return None
    
    dom_entry = _core.Domain(name=str(domain), location=location)
    
    return dom_entry