    # File lib/fog/openstack/models/compute/key_pair.rb, line 26
            def save
              requires :name

              data = if public_key
                connection.create_key_pair(name, public_key).body['keypair']
              else
                connection.create_key_pair(name).body['keypair']
              end
              new_attributes = data.reject {|key,value| !['fingerprint', 'public_key', 'name', 'private_key', 'user_id'].include?(key)}
              merge_attributes(new_attributes)
              true
            end