Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions lib/puppet/provider/cisco_aci_fvsubnet/cisco_aci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def self.allproperties
[
:ctrl,
:descr,
:name,
:name_alias,
:preferred,
:scope,
Expand All @@ -107,7 +106,6 @@ def self.pt_attr_2_mo_attr
:descr => 'descr',
:dn => 'dn',
:ip => 'ip',
:name => 'name',
:name_alias => 'nameAlias',
:preferred => 'preferred',
:scope => 'scope',
Expand Down Expand Up @@ -184,6 +182,4 @@ def self.mk_resource_methods_custom_setters
end

mk_resource_methods_custom_setters


end
end
12 changes: 6 additions & 6 deletions lib/puppet/type/cisco_aci_fvsubnet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.title_patterns
patterns << [
/^(\S+)$/,
[
[:name, identity]
[:ip, identity]
],
]
patterns
Expand All @@ -45,6 +45,10 @@ def self.title_patterns
# Namevars (Instance Identifiers)
# ---------------------------------------------------------------

#Only needed to satisfy name parameter.
newparam(:name) do
end

newparam(:ip, namevar: true) do
desc "https://pubhub.devnetcloud.com/media/apic-mim-ref-311/docs/MO-fvSubnet.html#ip"
end
Expand Down Expand Up @@ -75,10 +79,6 @@ def self.title_patterns
desc "https://pubhub.devnetcloud.com/media/apic-mim-ref-311/docs/MO-fvSubnet.html#descr"
end

newproperty(:name) do
desc "https://pubhub.devnetcloud.com/media/apic-mim-ref-311/docs/MO-fvSubnet.html#name"
end

newproperty(:name_alias) do
desc "https://pubhub.devnetcloud.com/media/apic-mim-ref-311/docs/MO-fvSubnet.html#nameAlias"
end
Expand All @@ -96,4 +96,4 @@ def self.title_patterns
end


end
end
2 changes: 2 additions & 0 deletions lib/puppet_x/cisco/aci_provider_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ def self.instances(provider_class)
instance_array = []
mos = Puppet::Util::NetworkDevice.current.get(
provider_class.mo_class_query_url)
namevar = provider_class.my_namevars[0]
mos['imdata'].each do |mo|
pt_attr_hash = self.xtract_attr_hash_frm_json(mo,provider_class)
pt_attr_hash.update({:name => pt_attr_hash[namevar]})
pt_attr_hash.update({:ensure => :present})
instance_array << provider_class.new(pt_attr_hash)
end
Expand Down