class Junos::Ez::UserAuths::Provider


Resource Property Methods



Provider Collection Methods


Public Instance Methods

build_catalog() click to toggle source
# File lib/junos-ez/system/userauths.rb, line 79
def build_catalog
  {}
end
build_list() click to toggle source
# File lib/junos-ez/system/userauths.rb, line 75
def build_list
  []
end
xml_at_top() click to toggle source

XML top placement


# File lib/junos-ez/system/userauths.rb, line 29
def xml_at_top
  Nokogiri::XML::Builder.new{|x| x.configuration{ 
    x.system { x.login { x.user { 
      x.name @name[:user]
      x.authentication {          
        x.send( @name[:keytype].to_sym ) {
          x.name @name[:publickey]
          return x
        }
      }
    }}}
  }}
end
xml_build_change( xml_at_here = nil ) click to toggle source

!! since we're not actually modifying any properties, we need !! to overload the xml_build_change method to simply return !! the config at-top (includes ssh name)

# File lib/junos-ez/system/userauths.rb, line 64
def xml_build_change( xml_at_here = nil )
  xml_at_top.doc.root
end
xml_get_has_xml( xml ) click to toggle source

XML readers


# File lib/junos-ez/system/userauths.rb, line 47
def xml_get_has_xml( xml )
  @should[:_active] = true              # mark it so it will write!
  xml.xpath('//user/authentication/*')[0]    
end
xml_read_parser( as_xml, as_hash ) click to toggle source
# File lib/junos-ez/system/userauths.rb, line 52
def xml_read_parser( as_xml, as_hash )
  set_has_status( as_xml, as_hash )
end