Forum Discussion
Bug in LocalLB::RateClass::create?
I'm attempting to create a new rate class on our BIG-IP_v11.1.0 device using the 10.0.0 SDK. The exception states that:
"Rate class '/Common/test_rate': ceiling rate must be greater than or equal to 296bps"
I'm passing it sizes larger than that but I can't seem to get past this.
Example code:
!perl
bin/bug_stub.pl
use iControlTypeCast;
use MIME::Base64;
use Data::Dumper;
use feature 'say';
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
my $user = 'admin';
my $pass = 'admin';
my $addr = '192.168.254.40';
my $port = '443';
my $proto = 'https';
my $proxy_path = 'iControl/iControlPortal.cgi';
my $UNIT_BPS = 0;
my $UNIT_KBPS = 1;
my $UNIT_MBPS = 2;
my $query = _construct_query('LocalLB', 'RateClass');
my @soapParams = ( SOAP::Data->name(rate_classes => ['test_rate']),
SOAP::Data->name(base_rates => [
{ rate => 500,
unit => $UNIT_BPS
}
]
)
);
say Dumper(@soapParams);
my $soapResponse = $query->create( @soapParams );
_handle_fault($soapResponse);
sub _construct_query
{
my($namespace,$class) = @_;
my $cred = MIME::Base64::encode($user . ':' . $pass);
my $query = SOAP::Lite->uri("urn:iControl:$namespace/$class")
-> proxy("$proto://$addr:$port/$proxy_path");
$query->transport->http_request->header( 'Authorization' => "Basic $cred" );
return $query;
}
sub _handle_fault
{
my($soapResponse) = @_;
if ( $soapResponse->fault )
{
say $soapResponse->faultcode, "(faultstring) ", $soapResponse->faultstring;
say $soapResponse->faultcode, "(faultdetail) ", $soapResponse->faultdetail;
die;
}
}
EOF
Output:
$VAR1 = bless( {
'_name' => 'rate_classes',
'_signature' => [],
'_value' => [
[
'test_rate'
]
],
'_attr' => {}
}, 'SOAP::Data' );
$VAR2 = bless( {
'_name' => 'base_rates',
'_signature' => [],
'_value' => [
[
{
'rate' => 500,
'unit' => 0
}
]
],
'_attr' => {}
}, 'SOAP::Data' );
SOAP-ENV:Server(faultstring) Exception caught in LocalLB::urn:iControl:LocalLB/RateClass::create()
Exception: Common::OperationFailed
primary_error_code : 17236601 (0x01070279)
secondary_error_code : 0
error_string : 01070279:3: Rate class '/Common/test_rate': ceiling rate must be greater than or equal to 296bps
Died at C:\Users\jtoomey.INTAD\Documents\PERL projects\ViprionRateGen-0.01\bin\bug_stub.pl line 58.
SOAP-ENV:Server(faultdetail)
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com