Exemplo n.º 1
0
def get_cert(cert_id):
    try:
        cert = get_ssl_manager().get_certificate(cert_id)
        cert['validityBegin'] = parse_date(cert['validityBegin'])
        cert['validityEnd'] = parse_date(cert['validityEnd'])
    except SoftLayerAPIError:
        cert = None

    return cert
Exemplo n.º 2
0
def all_zones():
    """ This method returns a dictionary of all available DNS zones.

    Note that this method is memoized for performance reasons!

    :param string username: The username of the current user. This is used
    to ensure memoization uniqueness.
    """
    zones = []

    for zone in get_dns_manager().list_zones():
        zones.append({'id': zone.get('id'),
                      'name': zone.get('name'),
                      'updated': parse_date(zone.get('updateDate'))})

    return zones
Exemplo n.º 3
0
def all_zones():
    """ This method returns a dictionary of all available DNS zones.

    Note that this method is memoized for performance reasons!

    :param string username: The username of the current user. This is used
    to ensure memoization uniqueness.
    """
    zones = []

    for zone in get_dns_manager().list_zones():
        zones.append({
            'id': zone.get('id'),
            'name': zone.get('name'),
            'updated': parse_date(zone.get('updateDate'))
        })

    return zones