Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error is not handled properly #9

Open
Jainpriyal opened this issue Nov 18, 2014 · 0 comments
Open

Error is not handled properly #9

Jainpriyal opened this issue Nov 18, 2014 · 0 comments

Comments

@Jainpriyal
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant