Skip to content

Error is not handled properly #9

Open
@Jainpriyal

Description

@Jainpriyal

When creating XE interface, speed is not a valid parameter. But when giving speed as a parameter in puppet manifest file

netdev_interface { "xe-0/1/0":
ensure => present,
active => true,
admin => up,
description => "interface-xe-0/1/0 is created and modified by puppet",
speed =>1g,
duplex => full
 }

Its not giving any error or warning while running puppet, and creating interface without speed.

% puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
ldapname is deprecated and will be removed in a future version
Info: Caching catalog for router
Info: Applying configuration version '1416302365'
Notice: /Stage[main]/Main/Netdev_l2_interface[xe-0/1/0]/ensure: created
Notice: /Stage[main]/Main/Netdev_interface[xe-0/1/0]/description: description changed '' to 'interface-xe-0/1/0 is created and modified by puppet'
Notice: /Stage[main]/Main/Netdev_interface[xe-0/1/0]/speed: speed changed 'auto' to '1g'
Info: JUNOS: Committing 2 changes.
Notice: JUNOS: 

[edit interfaces]
+   xe-0/1/0 {
+       description "interface-xe-0/1/0 is created and modified by puppet";
+       unit 0 {
+           description "l2-interface xe-0/1/0 is created by puppet in trunk mode";
+           family ethernet-switching {
+               interface-mode trunk;
+               vlan {
+                   members Green;
+               }
+           }
+       }
+   }

Notice: JUNOS: OK: COMMIT success!
Notice: Finished catalog run in 9.62 seconds
% cli
sh{master:0}
puppet@router> show configuration interfaces xe-0/1/0 
description "interface-xe-0/1/0 is created and modified by puppet";
unit 0 {
    description "l2-interface xe-0/1/0 is created by puppet in trunk mode";
    family ethernet-switching {
        interface-mode trunk;
        vlan {
            members Green;
        }
    }
}

It should give some kind of warning or error if using wrong parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions