Can't locate object method after upgrading to 23.4

Hi,

    has anyone had issues with the Perl Modules post upgrade to 23.4 on RHEL? Previously we could run scripts that made API calls with no issue (such as list device group) etc. Since the upgrade Im seeing this error:

1 use Opsware::NAS::Client;
2
3 my($host, $user, $pass) =
4 ('NAHOST','Userxxx','Passxxx');
5 my $nas = Opsware::NAS::Client->new();
6 my $res = $nas->login(-username => $user, -password => $pass, -host => $host );
7 if($res->ok()) {
8 print "Login success!\n\n";
9 my $groups = $res->list_device_group();
10 print $groups;
11 }else{
12 print "Login failed!!!\n";
13 }

Since the upgrade users are complaining that the scripts no longer work. An example of the output is shown below:

perl test3.pl
Login success!

Can't locate object method "list_device_group" via package "Opsware::NAS::Client::Result" at test3.pl line 9.

I have run the script to install the Perl modules in case

$ perl client/perl_api/har/install.pl

but still the error persist. Any help would be much appreciated!

Thanks

  • 0  

    I checked our 23.4 lab box and it was not up to the task, I had a bunch of things to go back and clean up...but client said it was installed.  

    Might be worth looking at the output just in case (as it's really buried in there) but you may be fine and don't think it's related....

    That said, I looked at another system we have and I'm seeing the same thing you mentioned, but not just for that command.  

    I took some scripts we use frequently in 2022.11 and none were working in the newer version of NA.  

    What version were you guys on prior to 23.4?  

    I'm curious and we'll hit this soon enough, so I'll post back what I find.  

  • 0

    I don't know if it's okey to post solutions from the support here.. So if that's not okey, sorry in advance :) 

    for me I had problems with NAS:Client module and the NAS:Connect module as well in 23.4.

    For the NAS:Client  I just tryed a "list_user" on which I got:

    method [nas:list_user] has returned an error: Can't use string ("1") as an ARRAY ref while "strict refs" in use at (eval 126) line 1.

    From the support I got the following:

    in the client perl module on the server I had to add "openText" to the regex on line 599:

    elsif( $self->{ -nas_brand } =~ /^Opsware.*$/ || $self->{ -nas_brand } =~ /^HP.*$/ || $self->{ -nas_brand } =~ /^HPE.*$/ || $self->{ -nas_brand } =~ /^Micro Focus.*$/ || $self->{ -nas_brand } =~ /^OpenText.*$/)

    And after around like line 1076 add "OpenText" as well (just in the same matter as the other elsif statements):

    } elsif( $txt =~ /^\s*(OpenText[\w\s]+)\s+(\d\S+)/i ) {

    $self->{ -nas_version } = $2;

    $self->{ -nas_brand } = $1;

    But obviously it's risky to change the perl modules just based on my feedback, probably better to open a case as well for yours...

    The NAS:Connect issue is still under investigation..

  • 0   in reply to 

    Thanks for posting.  Guess this slipped thru the cracks, and this might be in patch 1 whenever patch 1 comes out.  

    Hard to say how many people may have found this as well....QA....

    Again, thanks!

  • 0 in reply to 

    Thanks Guys , I wondered if you had received any more info on this issues or found any workarounds.?

  • 0   in reply to 

    I just checked and figured they'd have a patch out and that would contain an update / fix for this...but not seeing it.  That said, I've got to think they have a HF if you opened a case.  Or you could make the edit but personally, I'd first open a case and rule out them having this ready to hand out.  

    If you had a non-prod NA instance, you could try to get either an older version of Client or newer.  Definitely downsides to doing that, but I've run older modules with newer versions of NA - not great but it "can" work.  I asked about this problem and 24,2 and was told it was fixed in 24.2 but haven't had a chance to update and try,