NAME

WWW::LogicBoxes::Role::Command::Domain::PrivateNameServer - Private Nameserver Related Operations

SYNOPSIS

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;
    use WWW::LogicBoxes::PrivateNameServer;

    my $logic_boxes = WWW::LogicBoxes->new( ... );
    my $domain      = WWW::LogicBoxes::Domain->new( ... );

    # Creation
    my $private_nameserver = WWW::LogicBoxes::PrivateNameServer->new(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        ips       => [ '4.2.2.1' ],
    );

    $logic_boxes->create_private_nameserver( $private_nameserver );

    # Rename
    $logic_boxes->rename_private_nameserver(
        domain_id => $domain->id,
        old_name  => 'ns1.' . $domain->name,
        new_name  => 'ns2.' . $domain->name,
    );

    # Modify IP
    $logic_boxes->modify_private_nameserver_ip(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        old_ip    => '4.2.2.1',
        new_ip    => '8.8.8.8',
    );

    # Delete IP
    $logic_boxes->delete_private_nameserver_ip(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        ip        => '4.2.2.1',
    );

    # Delete Private Nameserver
    my $private_nameserver = WWW::LogicBoxes::PrivateNameServer->new( ... );
    $logic_boxes->delete_private_nameserver( $private_nameserver )

REQUIRES

submit
get_domain_by_id

DESCRIPTION

Implementes Private Nameserver related operations (what LogicBoxes refers to as "Child Nameservers") with the LogicBoxes API.

NOTE All private nameservers must be a subdomain of the parent domain. If the domain name is test-domain.com, ns1.test-domain.com would be valid while ns1.something-else.com would not be.

METHOD

create_private_nameserver

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;
    use WWW::LogicBoxes::PrivateNameServer;

    my $logic_boxes = WWW::LogicBoxes->new( ... );
    my $domain      = WWW::LogicBoxes::Domain->new( ... );

    my $private_nameserver = WWW::LogicBoxes::PrivateNameServer->new(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        ips       => [ '4.2.2.1', '2001:4860:4860:0:0:0:0:8888' ],
    );

    $logic_boxes->create_private_nameserver( $private_nameserver );

Given a WWW::LogicBoxes::PrivateNameServer or a HashRef that can be coerced into a WWW::LogicBoxes::PrivateNameServer, creates the specified private nameserver with LogicBoxes.

rename_private_nameserver

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;

    my $domain = WWW::LogicBoxes::Domain->new( ... );

    $logic_boxes->rename_private_nameserver(
        domain_id => $domain->id,
        old_name  => 'ns1.' . $domain->name,
        new_name  => 'ns2.' . $domain->name,
    );

Given an Integer domain id, the old nameserver hostname, and a new nameserver hostname, renames a WWW::LogicBoxes::PrivateNameServer.

modify_private_nameserver_ip

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;

    my $domain = WWW::LogicBoxes::Domain->new( ... );

    $logic_boxes->modify_private_nameserver_ip(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        old_ip    => '4.2.2.1',
        new_ip    => '2001:4860:4860:0:0:0:0:8888',
    );

Given an Integer domain id, nameserver hostname, an old_ip (that is currently assigned to the private nameserver), and a new_ip, modifies the ips assoicated with a WWW::LogicBoxes::PrivateNameServer.

delete_private_nameserver_ip

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;

    my $domain = WWW::LogicBoxes::Domain->new( ... );

    $logic_boxes->delete_private_nameserver_ip(
        domain_id => $domain->id,
        name      => 'ns1.' . $domain->name,
        ip        => '4.2.2.1', # Or an IPv4 Address
    );

Given an Integer domain id, nameserver hostname, and an ip (that is currently assigned to the private nameserver), removes the ip assoicated with a WWW::LogicBoxes::PrivateNameServer.

delete_private_nameserver

    use WWW::LogicBoxes;
    use WWW::LogicBoxes::Domain;
    use WWW::LogicBoxes::PrivateNameServer;

    my $domain = WWW::LogicBoxes::Domain->new( ... );

    my $private_nameserver = WWW::LogicBoxes::PrivateNameServer->new( ... );
    $logic_boxes->delete_private_nameserver( $private_nameserver )

Given a WWW::LogicBoxes::PrivateNameServer or a HashRef that can be coerced into a WWW::LogicBoxes::PrivateNameServer, deletes the specified private nameserver with LogicBoxes.