equal
deleted
inserted
replaced
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 |
21 |
22 # |
22 # |
23 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
24 # |
24 # |
25 |
25 |
26 Puppet::Type.type(:vni_interface).provide(:vni_interface) do |
26 Puppet::Type.type(:vni_interface).provide(:vni_interface) do |
27 desc "Provider for management of VNI interfaces for Oracle Solaris" |
27 desc "Provider for management of VNI interfaces for Oracle Solaris" |
28 confine :operatingsystem => [:solaris] |
28 confine :operatingsystem => [:solaris] |
49 end |
49 end |
50 |
50 |
51 def exists? |
51 def exists? |
52 p = exec_cmd(command(:ipadm), "show-if", "-p", "-o", "IFNAME,CLASS", |
52 p = exec_cmd(command(:ipadm), "show-if", "-p", "-o", "IFNAME,CLASS", |
53 @resource[:name]) |
53 @resource[:name]) |
54 if p[:exit] == 1: |
54 if p[:exit] == 1 |
55 return false |
55 return false |
56 end |
56 end |
57 |
57 |
58 ifname, ifclass = p[:out].strip().split(":", 2) |
58 ifname, ifclass = p[:out].strip().split(":", 2) |
59 if ifclass == "vni" |
59 if ifclass == "vni" |