HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //var/cache/puppet/lib/puppet/type/cs_commit.rb
Puppet::Type.newtype(:cs_commit) do
  @doc = 'Final commit statement which triggers the syncronous application of
          all primitive changes which reference this CIB. Do not generate more
          than one cs_commit referencing the same CIB for a given cluster!'

  feature :refreshable, 'The provider can execute the commit.', methods: [:commit]

  newparam(:cib) do
    desc 'Name of the CIB to commit. This value defaults to the name of
          the cs_commit resource.'

    def insync?(_is)
      true
    end

    defaultto { @resource[:name] }
  end

  newparam(:name) do
    desc 'Name of the CIB to commit. See the cib parameter for more detail.'
    isnamevar
  end

  def refresh
    provider.commit
  end

  autorequire(:service) do
    %w[corosync pacemaker]
  end

  autorequire(:cs_shadow) do
    autos = []
    autos << @parameters[:cib].value if @parameters[:cib]
    autos
  end

  if Puppet::Util::Package.versioncmp(Puppet::PUPPETVERSION, '4.0') < 0
    autorequire(:cs_primitive) do
      resources_with_cib :cs_primitive
    end

    autorequire(:cs_property) do
      resources_with_cib :cs_property
    end

    autorequire(:cs_colocation) do
      resources_with_cib :cs_colocation
    end

    autorequire(:cs_location) do
      resources_with_cib :cs_location
    end

    autorequire(:cs_group) do
      resources_with_cib :cs_group
    end

    autorequire(:cs_order) do
      resources_with_cib :cs_order
    end
  else
    autosubscribe(:cs_primitive) do
      resources_with_cib :cs_primitive
    end

    autosubscribe(:cs_property) do
      resources_with_cib :cs_property
    end

    autosubscribe(:cs_colocation) do
      resources_with_cib :cs_colocation
    end

    autosubscribe(:cs_location) do
      resources_with_cib :cs_location
    end

    autosubscribe(:cs_group) do
      resources_with_cib :cs_group
    end

    autosubscribe(:cs_order) do
      resources_with_cib :cs_order
    end
  end

  def resources_with_cib(resource_type)
    autos = []
    catalog.resources.select { |r| r.is_a?(Puppet::Type.type(resource_type)) && r.should(:cib) == should(:cib) }.each do |r|
      autos << r
    end

    autos
  end
end