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