Sha256: a282aeb704b8e909557a72596e3e4bc153842fae86ae82c092e18cb4adade50a

Contents?: true

Size: 795 Bytes

Versions: 44

Compression:

Stored size: 795 Bytes

Contents

module Fog
  module NFV
    class OpenStack
      class Real
        def create_vnfd(options)
          options_valid = [
            :auth,
            :vnfd,
          ]

          # Filter only allowed creation attributes
          data = options.select do |key, _|
            options_valid.include?(key.to_sym) || options_valid.include?(key.to_s)
          end

          request(
            :body    => Fog::JSON.encode(data),
            :expects => 201,
            :method  => "POST",
            :path    => "vnfds"
          )
        end
      end

      class Mock
        def create_vnfd(_)
          response = Excon::Response.new
          response.status = 201
          response.body = {"vnfd" => data[:vnfds].first}
          response
        end
      end
    end
  end
end

Version data entries

44 entries across 42 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.10 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.1.30 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.1.29 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.9 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.1.28 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.8 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.7 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.6 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.5 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.4 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.3 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.2 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.3.0 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.2.4 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.2.3 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.2.2 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.2.1 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-openstack-0.2.0 lib/fog/nfv/openstack/requests/create_vnfd.rb
fog-zj-0.1.28 lib/fog/nfv/openstack/requests/create_vnfd.rb