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

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

some puppet-keystone resources require this



48
49
50
# File 'lib/puppet/functions/noop_resource.rb', line 48

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

Instance Method Details

#createObject



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

def create
  true
end

#destroyObject



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

def destroy
  true
end

#exists?Boolean

Returns:

  • (Boolean)


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

def exists?
  false
end

#startObject



40
41
42
# File 'lib/puppet/functions/noop_resource.rb', line 40

def start
  true
end

#statusObject



36
37
38
# File 'lib/puppet/functions/noop_resource.rb', line 36

def status
  0
end

#stopObject



44
45
46
# File 'lib/puppet/functions/noop_resource.rb', line 44

def stop
  true
end