Class: Puppet::Provider::Noop

Inherits:
Puppet::Provider
  • Object
show all
Defined in:
lib/puppet/functions/noop_resource.rb

Overview

Copyright 2017 Red Hat, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author: Dan Prince <dprince@redhat.com>

A function to create noop providers (set as the default) for the named resource. This works alongside of ‘puppet apply –tags’ to disable some custom resource types that still attempt to run commands during prefetch, etc.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instancesObject



58
59
60
# File 'lib/puppet/functions/noop_resource.rb', line 58

def self.instances
  []
end

.resource_to_name(domain, name, check_for_default = true) ⇒ Object

some puppet-keystone resources require this



76
77
78
# File 'lib/puppet/functions/noop_resource.rb', line 76

def self.resource_to_name(domain, name, check_for_default = true)
  return name
end

Instance Method Details

#createObject

generic resource interfaces



25
26
27
# File 'lib/puppet/functions/noop_resource.rb', line 25

def create
  true
end

#destroyObject



29
30
31
# File 'lib/puppet/functions/noop_resource.rb', line 29

def destroy
  true
end

#exists?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/puppet/functions/noop_resource.rb', line 33

def exists?
  false
end

#installObject

package resource



38
39
40
# File 'lib/puppet/functions/noop_resource.rb', line 38

def install
  true
end

#latestObject



46
47
48
# File 'lib/puppet/functions/noop_resource.rb', line 46

def latest
  true
end

#purgeObject



54
55
56
# File 'lib/puppet/functions/noop_resource.rb', line 54

def purge
  true
end

#startObject



67
68
69
# File 'lib/puppet/functions/noop_resource.rb', line 67

def start
  true
end

#statusObject

service resource



63
64
65
# File 'lib/puppet/functions/noop_resource.rb', line 63

def status
  0
end

#stopObject



71
72
73
# File 'lib/puppet/functions/noop_resource.rb', line 71

def stop
  true
end

#uninstallObject



42
43
44
# File 'lib/puppet/functions/noop_resource.rb', line 42

def uninstall
  true
end

#updateObject



50
51
52
# File 'lib/puppet/functions/noop_resource.rb', line 50

def update
  true
end