Sha256: 8ef6e304220e9f831a38f9810f88e84c293bb00b82d9e6708c94977981217e63

Contents?: true

Size: 1006 Bytes

Versions: 4

Compression:

Stored size: 1006 Bytes

Contents

module FogExtensions
  module Vsphere
    module Snapshots
      module Mock
        # Overwrite this to stop infinite recursion
        # TODO: Add proper test data
        def list_child_snapshots(_snapshot, _opts = {})
          []
        end

        def remove_snapshot(options = {})
          raise ArgumentError, 'snapshot is a required parameter' unless options.key? 'snapshot'
          raise ArgumentError, 'removeChildren is a required parameter' unless options.key? 'removeChildren'

          {
            'task_state' => 'success'
          }
        end

        def rename_snapshot(options = {})
          raise ArgumentError, 'snapshot is a required parameter' unless options.key? 'snapshot'
          raise ArgumentError, 'name is a required parameter' unless options.key? 'name'
          raise ArgumentError, 'description is a required parameter' unless options.key? 'description'

          {
            'task_state' => 'success'
          }
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_snapshot_management-1.6.0 app/models/concerns/fog_extensions/vsphere/snapshots/mock.rb
foreman_snapshot_management-1.5.1 app/models/concerns/fog_extensions/vsphere/snapshots/mock.rb
foreman_snapshot_management-1.5.0 app/models/concerns/fog_extensions/vsphere/snapshots/mock.rb
foreman_snapshot_management-1.4.0 app/models/concerns/fog_extensions/vsphere/snapshots/mock.rb