If you run your own manage system you can use perl code like this which
would allow you or your customers to, for example, make nameserver changes
to a locked domain:
############################################
my $xcp_request = {
action => "",
object => "nameserver",
cookie => $cookie,
attributes => {
name => $fqdn,
ipaddress => $ip,
}
};
#get status of domain lock
$lock_response = $XML_Client->send_cmd(
{
action => 'get',
object => 'domain',
cookie => $cookie,
attributes => {
type => 'status',
}
}
);
#domain is locked, so unlock
if ( $lock_response->{ attributes }{ lock_state } ) {
$lock_response = $XML_Client->send_cmd(
{
action => 'modify',
object => 'domain',
cookie => $cookie,
attributes => {
data => 'status',
lock_state => 0,
}
}
);
#now make the change...
if ( $lock_response->{is_success}) {
$response = $XML_Client->send_cmd( $xcp_request );
}
#... and lock it back
$lock_response = $XML_Client->send_cmd(
{
action => 'modify',
object => 'domain',
cookie => $cookie,
attributes => {
data => 'status',
lock_state => 1,
}
}
);
#domain is not locked, so just make NS modifications
} else {
$response = $XML_Client->send_cmd( $xcp_request );
}
############################################
Hope this helps someone.
--
John Keegan
[EMAIL PROTECTED]
http://RackShare.com
> From: [EMAIL PROTECTED]
> Date: Wed, 04 Jun 2003 15:03:04 -0500
> To: <[EMAIL PROTECTED]>
> Subject: Re: bulk domain locking
>
>
> On that same note it would be really nice if there were a
> Block Lock/Unlock feature in the online admin interface.
>
> It's more that a little annoying to login to a profile in
> one window and then log into the admin interface and
> search though all the names for that profile and unlock
> them. Then return to the profile window to make name
> server change (or what even) then go back to the admin
> interface and re lock the domain.
>
> In fact, for several reasons, I feel the admin interface
> really needs a "filter by profile" function which the
> lock/unlock block operation (as well as *MANY* other
> useful operations and reports) could be used to operate
> on.
>
> Thanks!
>
>
> On Wed, 4 Jun 2003 15:18:34 -0400
> "Frank Michlick" <[EMAIL PROTECTED]> wrote:
>> Hi Roger,
>>
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED]
>> Behalf Of Roger Ward
>> Sent: Wednesday, June 04, 2003 15:01
>>
>>> In the Perl/PHP/XML API, what is the correct
>>> XCP command to BULK lock all of the domains
>>> in a profile? I have looked around and can
>>> only lock one domain at a time, but the 'Name
>>> Locking' guide dated 36MARCH2002 hints at a
>>> bulk feature I have not found.
>>
>> You are correct, you can currently only lock domain names
>> on a one by one basis
>> through the API.
>>
>> However our perl client code release includes a script
>> (located in the 'bin'
>> directory) that can be used for bulk locking a list of
>> domain names.
>>
>> Best regards,
>> Frank Michlick
>> --
>> Tucows Inc.
>> Senior Systems Engineer
>>
>>
>