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

Allow PHYSDEV variable #74

Open
opolyakov opened this issue Oct 6, 2015 · 2 comments
Open

Allow PHYSDEV variable #74

opolyakov opened this issue Oct 6, 2015 · 2 comments
Assignees

Comments

@opolyakov
Copy link

Sometimes one needs to specify PHYSDEV for VLAN interface, for example when interfaces are named vlanXXXX.

Here is the simple patch to add PHYSDEV into puppet-network :

--- manifests/init.pp.orig 2015-10-02 13:25:27.000000000 -0700
+++ manifests/init.pp 2015-10-01 16:45:32.000000000 -0700
@@ -116,6 +116,7 @@
$domain = undef,
$bridge = undef,
$linkdelay = undef,
+ $physdev = undef
) {
# Validate our booleans
validate_bool($userctl)
--- manifests/if/bridge.pp.orig 2015-10-02 13:26:47.000000000 -0700
+++ manifests/if/bridge.pp 2015-10-01 16:43:33.000000000 -0700
@@ -33,6 +33,7 @@
$bridge,
$mtu = undef,
$ethtool_opts = undef,
+ $physdev = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
--- templates/ifcfg-eth.erb.orig 2015-10-02 13:26:00.000000000 -0700
+++ templates/ifcfg-eth.erb 2015-10-01 16:39:11.000000000 -0700
@@ -50,4 +50,6 @@
<% end -%>
<% if @linkdelay %>LINKDELAY=<%= @linkdelay %>
<% end -%>
+<% if @physdev %>PHYSDEV="<%= @physdev %>"
+<% end -%>
NM_CONTROLLED=no

Puppet config for VLAN interface would include line
physdev => 'eth0',

It will be shown in configuration file as
PHYSDEV="eth0"

It would be also nice to add VLAN_NAME_TYPE variable there.

@razorsedge razorsedge self-assigned this Oct 7, 2015
@razorsedge
Copy link
Owner

@opolyakov Would you mind submitting that as a PR against the develop branch? Perhaps with some info in the README.md?

@opolyakov
Copy link
Author

I can do it, It just may take some time .

 On Tuesday, October 6, 2015 11:22 PM, Mike Arnold <[email protected]> wrote:

@opolyakov Would you mind submitting that as a PR against the develop branch? Perhaps with some info in the README.md?—
Reply to this email directly or view it on GitHub.

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

No branches or pull requests

2 participants