Send Netdot-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."


Today's Topics:

   1. Re: Netdot-users Digest, Vol 46, Issue 22 (Heidrich Attila)
   2. RE : Problem updating device info (Blakkheim.GW)
   3. Re: RE : Problem updating device info (Carlos Vicente)


----------------------------------------------------------------------

Message: 1
Date: Thu, 27 Sep 2012 20:33:55 +0000
From: Heidrich Attila <[email protected]>
Subject: Re: [Netdot-users] Netdot-users Digest, Vol 46, Issue 22
To: "[email protected]" <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

I personally prefer Pg over MySQL. However most of the opensource applications 
used here are MySQL based - while there are a few exceptions as usual.

To be short, It is more or less the same form me, let's say 51:49 for PG! :)

Attila--------------
Ezen uzenet kizarolag a cimzettjenek szol es olyan bizalmas jellegu
informaciokat tartalmazhat, amelyek feltarasat jogszabaly vagy szerzodes
tiltja. Amennyiben a jelen uzenetet On teves kezbesites folytan kapta,
kerjuk haladektalanul ertesitsen bennunket es az uzenetet annak
csatolmanyaival egyutt torolje. Amennyiben On nem cimzettje a jelen
uzenetnek, annak es mellekleteinek elolvasasa, masolasa, tovabbitasa, vagy
barmely celbol torteno felhasznalasa szigoruan tilos. Megjegyezzuk, hogy az
e-mail utjan torteno kozlesek nem garantaljak az elkuldott uzenetek
bizalmas jellegenek es teljessegenek megorzeset, valamint az uzenetek
megfelelo kezbesiteset. A fentieken tulmenoen, az Invitel Zrt.,
annak kapcsolt vallalkozasai, illetve az altaluk megbizott
harmadik felek a jelen e-mail cimrol kuldott, vagy arra erkezo barmely
uzenetet ellenorizhetnek, lemasolhatnak, felhasznalhatnak vagy harmadik fel
reszere tovabbithatnak.

This message is intended exclusively for its addressee and may contain
confidential information protected from disclosure by law or contract. If
you have received this message in error, please immediately notify us and
delete it together with its attachments. If you are not an addressee of
this message, reading, copying, distribution or use for any purpose of the
contents of this message or its attachments is strictly forbidden.
Additionally, please note that communication by email guarantees neither
the confidentiality nor the completeness or proper receipt of the messages
sent. Furthermore, Invitel Zrt., its affiliates and
third parties retained by them may monitor, copy, use or forward to third
parties any outgoing messages from and incoming messages to this email
address.



------------------------------

Message: 2
Date: Fri, 28 Sep 2012 10:24:54 +0200
From: "Blakkheim.GW" <[email protected]>
Subject: [Netdot-users] RE : Problem updating device info
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

Hello,

No one has ideas about this problem ? It is a blocking bug as we can't add our 
new network equipments.

It appears when I try to add the chassis but despite the error, the device is 
added to Netdot, but incompletely. And when I try to update the device, the 
error is here again.

Thanks.


> ----- Message d'origine -----
> De : Blakkheim.GW
> Envoy?s : 25.09.12 17:42
> ? : [email protected]
> Objet : Problem updating device info
> 
> Hello,
> 
> I use latest Netdot version.
> 
> When I try to update a device (HP chassis 8200ZL), using CLI or web 
> interface, I get this error :
> 
> 
> 
> ERROR: Error while inserting Product: Some fields cannot be null
> 
> Error details: Can't insert new Product: DBD::mysql::st execute failed: 
> Column 'type' cannot be null [for Statement "INSERT INTO product 
> (part_number, manufacturer, name, type)
> VALUES (?, ?, ?, ?)
> " with ParamValues: 0='SG210BQ07D', 1='3', 2='SG210BQ07D', 3=undef] at 
> /usr/share/perl5/DBIx/ContextualFetch.pm line 52.
> ?at /opt/netdot/lib/Netdot/Model/Device.pm line 5430
> 
> 
> 
> Any ideas ?
> 
> Thanks.
> 
> --
> Blakkheim.GW
> Last.fm profile : http://www.lastfm.fr/user/BlakkheimGW


--
Blakkheim.GW
Last.fm profile : http://www.lastfm.fr/user/BlakkheimGW


------------------------------

Message: 3
Date: Fri, 28 Sep 2012 11:42:46 -0400
From: Carlos Vicente <[email protected]>
Subject: Re: [Netdot-users] RE : Problem updating device info
To: "Blakkheim.GW" <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Hi,

I think I may have found the bug. If you'd like to try, here are the
changes in Device.pm (the line numbers will not match yours exactly):

-- cut -------------------------------------------------------------
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index ef4e94a..aa285f4 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -5486,16 +5486,20 @@ sub _update_modules {
                    -or => [part_number => $model,  name => $model],
                                                 })->first;

-               $product ||= Product->insert({part_number  => $model,
-                                             name         => $model,
-                                             manufacturer => $mf,
-                                            });
+               my $type = ProductType->find_or_create({name=>'Module'});

-               if ( !$product->type || $product->type->name eq 'Unknown' ){
-                   my $type =
ProductType->find_or_create({name=>'Module'});
-                   $product->update({type => $type});
+               if ( $product ){
+                   if ( !$product->type || $product->type->name eq
'Unknown' ){
+                       $product->update({type => $type});
+                   }
+               }else{
+                   $product = Product->insert({part_number  => $model,
+                                               name         => $model,
+                                               manufacturer => $mf,
+                                               type         => $type,
+                                              });
                }
-
+
                # Find or create asset
                $asset = Asset->find_or_create({product_id    => $product,
                                                serial_number => $serial,
-- cut -------------------------------------------------------------


Let me know.


On 9/28/12 4:24 AM, Blakkheim.GW wrote:
> Hello,
> 
> No one has ideas about this problem ? It is a blocking bug as we
> can't add our new network equipments.
> 
> It appears when I try to add the chassis but despite the error, the
> device is added to Netdot, but incompletely. And when I try to update
> the device, the error is here again.
> 
> Thanks.
> 
> 
>> ----- Message d'origine ----- De : Blakkheim.GW Envoy?s : 25.09.12
>> 17:42 ? : [email protected] Objet : Problem updating
>> device info
>> 
>> Hello,
>> 
>> I use latest Netdot version.
>> 
>> When I try to update a device (HP chassis 8200ZL), using CLI or web
>> interface, I get this error :
>> 
>> 
>> 
>> ERROR: Error while inserting Product: Some fields cannot be null
>> 
>> Error details: Can't insert new Product: DBD::mysql::st execute
>> failed: Column 'type' cannot be null [for Statement "INSERT INTO
>> product (part_number, manufacturer, name, type) VALUES (?, ?, ?,
>> ?) " with ParamValues: 0='SG210BQ07D', 1='3', 2='SG210BQ07D',
>> 3=undef] at /usr/share/perl5/DBIx/ContextualFetch.pm line 52. at
>> /opt/netdot/lib/Netdot/Model/Device.pm line 5430
>> 
>> 
>> 
>> Any ideas ?
>> 
>> Thanks.
>> 
>> -- Blakkheim.GW Last.fm profile :
>> http://www.lastfm.fr/user/BlakkheimGW
> 
> 
> -- Blakkheim.GW Last.fm profile :
> http://www.lastfm.fr/user/BlakkheimGW 
> _______________________________________________ Netdot-users mailing
> list [email protected] 
> https://osl.uoregon.edu/mailman/listinfo/netdot-users
> 


-- 
cv


------------------------------

_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users


End of Netdot-users Digest, Vol 46, Issue 23
********************************************

Reply via email to