pnap_rancher_api 1.0.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +3 -4
 - data/VERSION +1 -1
 - data/docs/Cluster.md +3 -3
 - data/docs/ClustersApi.md +6 -8
 - data/docs/NodePool.md +2 -2
 - data/docs/RancherClusterConfig.md +1 -1
 - data/lib/pnap_rancher_api/api/clusters_api.rb +11 -7
 - data/lib/pnap_rancher_api/api_client.rb +24 -21
 - data/lib/pnap_rancher_api/api_error.rb +2 -1
 - data/lib/pnap_rancher_api/configuration.rb +28 -9
 - data/lib/pnap_rancher_api/models/cluster.rb +25 -24
 - data/lib/pnap_rancher_api/models/delete_result.rb +18 -19
 - data/lib/pnap_rancher_api/models/error.rb +16 -19
 - data/lib/pnap_rancher_api/models/node.rb +14 -19
 - data/lib/pnap_rancher_api/models/node_pool.rb +54 -20
 - data/lib/pnap_rancher_api/models/rancher_cluster_certificates.rb +14 -19
 - data/lib/pnap_rancher_api/models/rancher_cluster_config.rb +15 -20
 - data/lib/pnap_rancher_api/models/rancher_server_metadata.rb +14 -19
 - data/lib/pnap_rancher_api/models/ssh_config.rb +14 -19
 - data/lib/pnap_rancher_api/models/workload_cluster_config.rb +16 -19
 - data/lib/pnap_rancher_api/version.rb +1 -1
 - data/lib/pnap_rancher_api.rb +1 -5
 - data/pnap_rancher_api.gemspec +2 -2
 - data/spec/api/clusters_api_spec.rb +7 -7
 - data/spec/models/cluster_spec.rb +14 -12
 - data/spec/models/delete_result_spec.rb +6 -4
 - data/spec/models/error_spec.rb +6 -4
 - data/spec/models/node_pool_spec.rb +9 -7
 - data/spec/models/node_spec.rb +5 -3
 - data/spec/models/rancher_cluster_certificates_spec.rb +7 -5
 - data/spec/models/rancher_cluster_config_spec.rb +11 -9
 - data/spec/models/rancher_server_metadata_spec.rb +7 -5
 - data/spec/models/ssh_config_spec.rb +7 -5
 - data/spec/models/workload_cluster_config_spec.rb +8 -6
 - data/spec/spec_helper.rb +1 -1
 - metadata +9 -29
 - data/docs/ClusterConfiguration.md +0 -30
 - data/docs/ClusterWorkloadConfiguration.md +0 -24
 - data/docs/NodePoolSshConfig.md +0 -22
 - data/docs/RancherClusterConfigCertificates.md +0 -22
 - data/lib/pnap_rancher_api/models/cluster_configuration.rb +0 -290
 - data/lib/pnap_rancher_api/models/cluster_workload_configuration.rb +0 -271
 - data/lib/pnap_rancher_api/models/node_pool_ssh_config.rb +0 -253
 - data/lib/pnap_rancher_api/models/rancher_cluster_config_certificates.rb +0 -247
 - data/spec/api_client_spec.rb +0 -226
 - data/spec/configuration_spec.rb +0 -42
 - data/spec/models/cluster_configuration_spec.rb +0 -70
 - data/spec/models/cluster_workload_configuration_spec.rb +0 -52
 - data/spec/models/node_pool_ssh_config_spec.rb +0 -46
 - data/spec/models/rancher_cluster_config_certificates_spec.rb +0 -46
 
| 
         @@ -1,247 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'date'
         
     | 
| 
       14 
     | 
    
         
            -
            require 'time'
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
            module RancherApi
         
     | 
| 
       17 
     | 
    
         
            -
              class RancherClusterConfigCertificates
         
     | 
| 
       18 
     | 
    
         
            -
                # The SSL CA certificate to be used for rancher admin.
         
     | 
| 
       19 
     | 
    
         
            -
                attr_accessor :ca_certificate
         
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
                # The SSL certificate to be used for rancher admin.
         
     | 
| 
       22 
     | 
    
         
            -
                attr_accessor :certificate
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                # The SSL certificate key to be used for rancher admin.
         
     | 
| 
       25 
     | 
    
         
            -
                attr_accessor :certificate_key
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                # Attribute mapping from ruby-style variable name to JSON key.
         
     | 
| 
       28 
     | 
    
         
            -
                def self.attribute_map
         
     | 
| 
       29 
     | 
    
         
            -
                  {
         
     | 
| 
       30 
     | 
    
         
            -
                    :'ca_certificate' => :'caCertificate',
         
     | 
| 
       31 
     | 
    
         
            -
                    :'certificate' => :'certificate',
         
     | 
| 
       32 
     | 
    
         
            -
                    :'certificate_key' => :'certificateKey'
         
     | 
| 
       33 
     | 
    
         
            -
                  }
         
     | 
| 
       34 
     | 
    
         
            -
                end
         
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
                # Returns all the JSON keys this model knows about
         
     | 
| 
       37 
     | 
    
         
            -
                def self.acceptable_attributes
         
     | 
| 
       38 
     | 
    
         
            -
                  attribute_map.values
         
     | 
| 
       39 
     | 
    
         
            -
                end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                # Attribute type mapping.
         
     | 
| 
       42 
     | 
    
         
            -
                def self.openapi_types
         
     | 
| 
       43 
     | 
    
         
            -
                  {
         
     | 
| 
       44 
     | 
    
         
            -
                    :'ca_certificate' => :'String',
         
     | 
| 
       45 
     | 
    
         
            -
                    :'certificate' => :'String',
         
     | 
| 
       46 
     | 
    
         
            -
                    :'certificate_key' => :'String'
         
     | 
| 
       47 
     | 
    
         
            -
                  }
         
     | 
| 
       48 
     | 
    
         
            -
                end
         
     | 
| 
       49 
     | 
    
         
            -
             
     | 
| 
       50 
     | 
    
         
            -
                # List of attributes with nullable: true
         
     | 
| 
       51 
     | 
    
         
            -
                def self.openapi_nullable
         
     | 
| 
       52 
     | 
    
         
            -
                  Set.new([
         
     | 
| 
       53 
     | 
    
         
            -
                  ])
         
     | 
| 
       54 
     | 
    
         
            -
                end
         
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
                # List of class defined in allOf (OpenAPI v3)
         
     | 
| 
       57 
     | 
    
         
            -
                def self.openapi_all_of
         
     | 
| 
       58 
     | 
    
         
            -
                  [
         
     | 
| 
       59 
     | 
    
         
            -
                  :'RancherClusterCertificates'
         
     | 
| 
       60 
     | 
    
         
            -
                  ]
         
     | 
| 
       61 
     | 
    
         
            -
                end
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                # Initializes the object
         
     | 
| 
       64 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       65 
     | 
    
         
            -
                def initialize(attributes = {})
         
     | 
| 
       66 
     | 
    
         
            -
                  if (!attributes.is_a?(Hash))
         
     | 
| 
       67 
     | 
    
         
            -
                    fail ArgumentError, "The input argument (attributes) must be a hash in `RancherApi::RancherClusterConfigCertificates` initialize method"
         
     | 
| 
       68 
     | 
    
         
            -
                  end
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                  # check to see if the attribute exists and convert string to symbol for hash key
         
     | 
| 
       71 
     | 
    
         
            -
                  attributes = attributes.each_with_object({}) { |(k, v), h|
         
     | 
| 
       72 
     | 
    
         
            -
                    if (!self.class.attribute_map.key?(k.to_sym))
         
     | 
| 
       73 
     | 
    
         
            -
                      fail ArgumentError, "`#{k}` is not a valid attribute in `RancherApi::RancherClusterConfigCertificates`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
         
     | 
| 
       74 
     | 
    
         
            -
                    end
         
     | 
| 
       75 
     | 
    
         
            -
                    h[k.to_sym] = v
         
     | 
| 
       76 
     | 
    
         
            -
                  }
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                  if attributes.key?(:'ca_certificate')
         
     | 
| 
       79 
     | 
    
         
            -
                    self.ca_certificate = attributes[:'ca_certificate']
         
     | 
| 
       80 
     | 
    
         
            -
                  end
         
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
                  if attributes.key?(:'certificate')
         
     | 
| 
       83 
     | 
    
         
            -
                    self.certificate = attributes[:'certificate']
         
     | 
| 
       84 
     | 
    
         
            -
                  end
         
     | 
| 
       85 
     | 
    
         
            -
             
     | 
| 
       86 
     | 
    
         
            -
                  if attributes.key?(:'certificate_key')
         
     | 
| 
       87 
     | 
    
         
            -
                    self.certificate_key = attributes[:'certificate_key']
         
     | 
| 
       88 
     | 
    
         
            -
                  end
         
     | 
| 
       89 
     | 
    
         
            -
                end
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                # Show invalid properties with the reasons. Usually used together with valid?
         
     | 
| 
       92 
     | 
    
         
            -
                # @return Array for valid properties with the reasons
         
     | 
| 
       93 
     | 
    
         
            -
                def list_invalid_properties
         
     | 
| 
       94 
     | 
    
         
            -
                  invalid_properties = Array.new
         
     | 
| 
       95 
     | 
    
         
            -
                  invalid_properties
         
     | 
| 
       96 
     | 
    
         
            -
                end
         
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
                # Check to see if the all the properties in the model are valid
         
     | 
| 
       99 
     | 
    
         
            -
                # @return true if the model is valid
         
     | 
| 
       100 
     | 
    
         
            -
                def valid?
         
     | 
| 
       101 
     | 
    
         
            -
                  true
         
     | 
| 
       102 
     | 
    
         
            -
                end
         
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
                # Checks equality by comparing each attribute.
         
     | 
| 
       105 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       106 
     | 
    
         
            -
                def ==(o)
         
     | 
| 
       107 
     | 
    
         
            -
                  return true if self.equal?(o)
         
     | 
| 
       108 
     | 
    
         
            -
                  self.class == o.class &&
         
     | 
| 
       109 
     | 
    
         
            -
                      ca_certificate == o.ca_certificate &&
         
     | 
| 
       110 
     | 
    
         
            -
                      certificate == o.certificate &&
         
     | 
| 
       111 
     | 
    
         
            -
                      certificate_key == o.certificate_key
         
     | 
| 
       112 
     | 
    
         
            -
                end
         
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
                # @see the `==` method
         
     | 
| 
       115 
     | 
    
         
            -
                # @param [Object] Object to be compared
         
     | 
| 
       116 
     | 
    
         
            -
                def eql?(o)
         
     | 
| 
       117 
     | 
    
         
            -
                  self == o
         
     | 
| 
       118 
     | 
    
         
            -
                end
         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                # Calculates hash code according to all attributes.
         
     | 
| 
       121 
     | 
    
         
            -
                # @return [Integer] Hash code
         
     | 
| 
       122 
     | 
    
         
            -
                def hash
         
     | 
| 
       123 
     | 
    
         
            -
                  [ca_certificate, certificate, certificate_key].hash
         
     | 
| 
       124 
     | 
    
         
            -
                end
         
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       127 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       128 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       129 
     | 
    
         
            -
                def self.build_from_hash(attributes)
         
     | 
| 
       130 
     | 
    
         
            -
                  new.build_from_hash(attributes)
         
     | 
| 
       131 
     | 
    
         
            -
                end
         
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
                # Builds the object from hash
         
     | 
| 
       134 
     | 
    
         
            -
                # @param [Hash] attributes Model attributes in the form of hash
         
     | 
| 
       135 
     | 
    
         
            -
                # @return [Object] Returns the model itself
         
     | 
| 
       136 
     | 
    
         
            -
                def build_from_hash(attributes)
         
     | 
| 
       137 
     | 
    
         
            -
                  return nil unless attributes.is_a?(Hash)
         
     | 
| 
       138 
     | 
    
         
            -
                  attributes = attributes.transform_keys(&:to_sym)
         
     | 
| 
       139 
     | 
    
         
            -
                  self.class.openapi_types.each_pair do |key, type|
         
     | 
| 
       140 
     | 
    
         
            -
                    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
         
     | 
| 
       141 
     | 
    
         
            -
                      self.send("#{key}=", nil)
         
     | 
| 
       142 
     | 
    
         
            -
                    elsif type =~ /\AArray<(.*)>/i
         
     | 
| 
       143 
     | 
    
         
            -
                      # check to ensure the input is an array given that the attribute
         
     | 
| 
       144 
     | 
    
         
            -
                      # is documented as an array but the input is not
         
     | 
| 
       145 
     | 
    
         
            -
                      if attributes[self.class.attribute_map[key]].is_a?(Array)
         
     | 
| 
       146 
     | 
    
         
            -
                        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
         
     | 
| 
       147 
     | 
    
         
            -
                      end
         
     | 
| 
       148 
     | 
    
         
            -
                    elsif !attributes[self.class.attribute_map[key]].nil?
         
     | 
| 
       149 
     | 
    
         
            -
                      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
         
     | 
| 
       150 
     | 
    
         
            -
                    end
         
     | 
| 
       151 
     | 
    
         
            -
                  end
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
                  self
         
     | 
| 
       154 
     | 
    
         
            -
                end
         
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                # Deserializes the data based on type
         
     | 
| 
       157 
     | 
    
         
            -
                # @param string type Data type
         
     | 
| 
       158 
     | 
    
         
            -
                # @param string value Value to be deserialized
         
     | 
| 
       159 
     | 
    
         
            -
                # @return [Object] Deserialized data
         
     | 
| 
       160 
     | 
    
         
            -
                def _deserialize(type, value)
         
     | 
| 
       161 
     | 
    
         
            -
                  case type.to_sym
         
     | 
| 
       162 
     | 
    
         
            -
                  when :Time
         
     | 
| 
       163 
     | 
    
         
            -
                    Time.parse(value)
         
     | 
| 
       164 
     | 
    
         
            -
                  when :Date
         
     | 
| 
       165 
     | 
    
         
            -
                    Date.parse(value)
         
     | 
| 
       166 
     | 
    
         
            -
                  when :String
         
     | 
| 
       167 
     | 
    
         
            -
                    value.to_s
         
     | 
| 
       168 
     | 
    
         
            -
                  when :Integer
         
     | 
| 
       169 
     | 
    
         
            -
                    value.to_i
         
     | 
| 
       170 
     | 
    
         
            -
                  when :Float
         
     | 
| 
       171 
     | 
    
         
            -
                    value.to_f
         
     | 
| 
       172 
     | 
    
         
            -
                  when :Boolean
         
     | 
| 
       173 
     | 
    
         
            -
                    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
         
     | 
| 
       174 
     | 
    
         
            -
                      true
         
     | 
| 
       175 
     | 
    
         
            -
                    else
         
     | 
| 
       176 
     | 
    
         
            -
                      false
         
     | 
| 
       177 
     | 
    
         
            -
                    end
         
     | 
| 
       178 
     | 
    
         
            -
                  when :Object
         
     | 
| 
       179 
     | 
    
         
            -
                    # generic object (usually a Hash), return directly
         
     | 
| 
       180 
     | 
    
         
            -
                    value
         
     | 
| 
       181 
     | 
    
         
            -
                  when /\AArray<(?<inner_type>.+)>\z/
         
     | 
| 
       182 
     | 
    
         
            -
                    inner_type = Regexp.last_match[:inner_type]
         
     | 
| 
       183 
     | 
    
         
            -
                    value.map { |v| _deserialize(inner_type, v) }
         
     | 
| 
       184 
     | 
    
         
            -
                  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
         
     | 
| 
       185 
     | 
    
         
            -
                    k_type = Regexp.last_match[:k_type]
         
     | 
| 
       186 
     | 
    
         
            -
                    v_type = Regexp.last_match[:v_type]
         
     | 
| 
       187 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       188 
     | 
    
         
            -
                      value.each do |k, v|
         
     | 
| 
       189 
     | 
    
         
            -
                        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
         
     | 
| 
       190 
     | 
    
         
            -
                      end
         
     | 
| 
       191 
     | 
    
         
            -
                    end
         
     | 
| 
       192 
     | 
    
         
            -
                  else # model
         
     | 
| 
       193 
     | 
    
         
            -
                    # models (e.g. Pet) or oneOf
         
     | 
| 
       194 
     | 
    
         
            -
                    klass = RancherApi.const_get(type)
         
     | 
| 
       195 
     | 
    
         
            -
                    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
         
     | 
| 
       196 
     | 
    
         
            -
                  end
         
     | 
| 
       197 
     | 
    
         
            -
                end
         
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
                # Returns the string representation of the object
         
     | 
| 
       200 
     | 
    
         
            -
                # @return [String] String presentation of the object
         
     | 
| 
       201 
     | 
    
         
            -
                def to_s
         
     | 
| 
       202 
     | 
    
         
            -
                  to_hash.to_s
         
     | 
| 
       203 
     | 
    
         
            -
                end
         
     | 
| 
       204 
     | 
    
         
            -
             
     | 
| 
       205 
     | 
    
         
            -
                # to_body is an alias to to_hash (backward compatibility)
         
     | 
| 
       206 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       207 
     | 
    
         
            -
                def to_body
         
     | 
| 
       208 
     | 
    
         
            -
                  to_hash
         
     | 
| 
       209 
     | 
    
         
            -
                end
         
     | 
| 
       210 
     | 
    
         
            -
             
     | 
| 
       211 
     | 
    
         
            -
                # Returns the object in the form of hash
         
     | 
| 
       212 
     | 
    
         
            -
                # @return [Hash] Returns the object in the form of hash
         
     | 
| 
       213 
     | 
    
         
            -
                def to_hash
         
     | 
| 
       214 
     | 
    
         
            -
                  hash = {}
         
     | 
| 
       215 
     | 
    
         
            -
                  self.class.attribute_map.each_pair do |attr, param|
         
     | 
| 
       216 
     | 
    
         
            -
                    value = self.send(attr)
         
     | 
| 
       217 
     | 
    
         
            -
                    if value.nil?
         
     | 
| 
       218 
     | 
    
         
            -
                      is_nullable = self.class.openapi_nullable.include?(attr)
         
     | 
| 
       219 
     | 
    
         
            -
                      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
         
     | 
| 
       220 
     | 
    
         
            -
                    end
         
     | 
| 
       221 
     | 
    
         
            -
             
     | 
| 
       222 
     | 
    
         
            -
                    hash[param] = _to_hash(value)
         
     | 
| 
       223 
     | 
    
         
            -
                  end
         
     | 
| 
       224 
     | 
    
         
            -
                  hash
         
     | 
| 
       225 
     | 
    
         
            -
                end
         
     | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
       227 
     | 
    
         
            -
                # Outputs non-array value in the form of hash
         
     | 
| 
       228 
     | 
    
         
            -
                # For object, use to_hash. Otherwise, just return the value
         
     | 
| 
       229 
     | 
    
         
            -
                # @param [Object] value Any valid value
         
     | 
| 
       230 
     | 
    
         
            -
                # @return [Hash] Returns the value in the form of hash
         
     | 
| 
       231 
     | 
    
         
            -
                def _to_hash(value)
         
     | 
| 
       232 
     | 
    
         
            -
                  if value.is_a?(Array)
         
     | 
| 
       233 
     | 
    
         
            -
                    value.compact.map { |v| _to_hash(v) }
         
     | 
| 
       234 
     | 
    
         
            -
                  elsif value.is_a?(Hash)
         
     | 
| 
       235 
     | 
    
         
            -
                    {}.tap do |hash|
         
     | 
| 
       236 
     | 
    
         
            -
                      value.each { |k, v| hash[k] = _to_hash(v) }
         
     | 
| 
       237 
     | 
    
         
            -
                    end
         
     | 
| 
       238 
     | 
    
         
            -
                  elsif value.respond_to? :to_hash
         
     | 
| 
       239 
     | 
    
         
            -
                    value.to_hash
         
     | 
| 
       240 
     | 
    
         
            -
                  else
         
     | 
| 
       241 
     | 
    
         
            -
                    value
         
     | 
| 
       242 
     | 
    
         
            -
                  end
         
     | 
| 
       243 
     | 
    
         
            -
                end
         
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
              end
         
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
     | 
    
         
            -
            end
         
     | 
    
        data/spec/api_client_spec.rb
    DELETED
    
    | 
         @@ -1,226 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            describe RancherApi::ApiClient do
         
     | 
| 
       16 
     | 
    
         
            -
              context 'initialization' do
         
     | 
| 
       17 
     | 
    
         
            -
                context 'URL stuff' do
         
     | 
| 
       18 
     | 
    
         
            -
                  context 'host' do
         
     | 
| 
       19 
     | 
    
         
            -
                    it 'removes http from host' do
         
     | 
| 
       20 
     | 
    
         
            -
                      RancherApi.configure { |c| c.host = 'http://example.com' }
         
     | 
| 
       21 
     | 
    
         
            -
                      expect(RancherApi::Configuration.default.host).to eq('example.com')
         
     | 
| 
       22 
     | 
    
         
            -
                    end
         
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
                    it 'removes https from host' do
         
     | 
| 
       25 
     | 
    
         
            -
                      RancherApi.configure { |c| c.host = 'https://wookiee.com' }
         
     | 
| 
       26 
     | 
    
         
            -
                      expect(RancherApi::ApiClient.default.config.host).to eq('wookiee.com')
         
     | 
| 
       27 
     | 
    
         
            -
                    end
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
                    it 'removes trailing path from host' do
         
     | 
| 
       30 
     | 
    
         
            -
                      RancherApi.configure { |c| c.host = 'hobo.com/v4' }
         
     | 
| 
       31 
     | 
    
         
            -
                      expect(RancherApi::Configuration.default.host).to eq('hobo.com')
         
     | 
| 
       32 
     | 
    
         
            -
                    end
         
     | 
| 
       33 
     | 
    
         
            -
                  end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                  context 'base_path' do
         
     | 
| 
       36 
     | 
    
         
            -
                    it "prepends a slash to base_path" do
         
     | 
| 
       37 
     | 
    
         
            -
                      RancherApi.configure { |c| c.base_path = 'v4/dog' }
         
     | 
| 
       38 
     | 
    
         
            -
                      expect(RancherApi::Configuration.default.base_path).to eq('/v4/dog')
         
     | 
| 
       39 
     | 
    
         
            -
                    end
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
                    it "doesn't prepend a slash if one is already there" do
         
     | 
| 
       42 
     | 
    
         
            -
                      RancherApi.configure { |c| c.base_path = '/v4/dog' }
         
     | 
| 
       43 
     | 
    
         
            -
                      expect(RancherApi::Configuration.default.base_path).to eq('/v4/dog')
         
     | 
| 
       44 
     | 
    
         
            -
                    end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
                    it "ends up as a blank string if nil" do
         
     | 
| 
       47 
     | 
    
         
            -
                      RancherApi.configure { |c| c.base_path = nil }
         
     | 
| 
       48 
     | 
    
         
            -
                      expect(RancherApi::Configuration.default.base_path).to eq('')
         
     | 
| 
       49 
     | 
    
         
            -
                    end
         
     | 
| 
       50 
     | 
    
         
            -
                  end
         
     | 
| 
       51 
     | 
    
         
            -
                end
         
     | 
| 
       52 
     | 
    
         
            -
              end
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
              describe 'params_encoding in #build_request' do
         
     | 
| 
       55 
     | 
    
         
            -
                let(:config) { RancherApi::Configuration.new }
         
     | 
| 
       56 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new(config) }
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                it 'defaults to nil' do
         
     | 
| 
       59 
     | 
    
         
            -
                  expect(RancherApi::Configuration.default.params_encoding).to eq(nil)
         
     | 
| 
       60 
     | 
    
         
            -
                  expect(config.params_encoding).to eq(nil)
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                  request = api_client.build_request(:get, '/test')
         
     | 
| 
       63 
     | 
    
         
            -
                  expect(request.options[:params_encoding]).to eq(nil)
         
     | 
| 
       64 
     | 
    
         
            -
                end
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
                it 'can be customized' do
         
     | 
| 
       67 
     | 
    
         
            -
                  config.params_encoding = :multi
         
     | 
| 
       68 
     | 
    
         
            -
                  request = api_client.build_request(:get, '/test')
         
     | 
| 
       69 
     | 
    
         
            -
                  expect(request.options[:params_encoding]).to eq(:multi)
         
     | 
| 
       70 
     | 
    
         
            -
                end
         
     | 
| 
       71 
     | 
    
         
            -
              end
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
              describe 'timeout in #build_request' do
         
     | 
| 
       74 
     | 
    
         
            -
                let(:config) { RancherApi::Configuration.new }
         
     | 
| 
       75 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new(config) }
         
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
                it 'defaults to 0' do
         
     | 
| 
       78 
     | 
    
         
            -
                  expect(RancherApi::Configuration.default.timeout).to eq(0)
         
     | 
| 
       79 
     | 
    
         
            -
                  expect(config.timeout).to eq(0)
         
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
                  request = api_client.build_request(:get, '/test')
         
     | 
| 
       82 
     | 
    
         
            -
                  expect(request.options[:timeout]).to eq(0)
         
     | 
| 
       83 
     | 
    
         
            -
                end
         
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                it 'can be customized' do
         
     | 
| 
       86 
     | 
    
         
            -
                  config.timeout = 100
         
     | 
| 
       87 
     | 
    
         
            -
                  request = api_client.build_request(:get, '/test')
         
     | 
| 
       88 
     | 
    
         
            -
                  expect(request.options[:timeout]).to eq(100)
         
     | 
| 
       89 
     | 
    
         
            -
                end
         
     | 
| 
       90 
     | 
    
         
            -
              end
         
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
              describe '#deserialize' do
         
     | 
| 
       93 
     | 
    
         
            -
                it "handles Array<Integer>" do
         
     | 
| 
       94 
     | 
    
         
            -
                  api_client = RancherApi::ApiClient.new
         
     | 
| 
       95 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       96 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '[12, 34]')
         
     | 
| 
       97 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Array<Integer>')
         
     | 
| 
       98 
     | 
    
         
            -
                  expect(data).to be_instance_of(Array)
         
     | 
| 
       99 
     | 
    
         
            -
                  expect(data).to eq([12, 34])
         
     | 
| 
       100 
     | 
    
         
            -
                end
         
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
                it 'handles Array<Array<Integer>>' do
         
     | 
| 
       103 
     | 
    
         
            -
                  api_client = RancherApi::ApiClient.new
         
     | 
| 
       104 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       105 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '[[12, 34], [56]]')
         
     | 
| 
       106 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Array<Array<Integer>>')
         
     | 
| 
       107 
     | 
    
         
            -
                  expect(data).to be_instance_of(Array)
         
     | 
| 
       108 
     | 
    
         
            -
                  expect(data).to eq([[12, 34], [56]])
         
     | 
| 
       109 
     | 
    
         
            -
                end
         
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
                it 'handles Hash<String, String>' do
         
     | 
| 
       112 
     | 
    
         
            -
                  api_client = RancherApi::ApiClient.new
         
     | 
| 
       113 
     | 
    
         
            -
                  headers = { 'Content-Type' => 'application/json' }
         
     | 
| 
       114 
     | 
    
         
            -
                  response = double('response', headers: headers, body: '{"message": "Hello"}')
         
     | 
| 
       115 
     | 
    
         
            -
                  data = api_client.deserialize(response, 'Hash<String, String>')
         
     | 
| 
       116 
     | 
    
         
            -
                  expect(data).to be_instance_of(Hash)
         
     | 
| 
       117 
     | 
    
         
            -
                  expect(data).to eq(:message => 'Hello')
         
     | 
| 
       118 
     | 
    
         
            -
                end
         
     | 
| 
       119 
     | 
    
         
            -
              end
         
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
              describe "#object_to_hash" do
         
     | 
| 
       122 
     | 
    
         
            -
                it 'ignores nils and includes empty arrays' do
         
     | 
| 
       123 
     | 
    
         
            -
                  # uncomment below to test object_to_hash for model
         
     | 
| 
       124 
     | 
    
         
            -
                  # api_client = RancherApi::ApiClient.new
         
     | 
| 
       125 
     | 
    
         
            -
                  # _model = RancherApi::ModelName.new
         
     | 
| 
       126 
     | 
    
         
            -
                  # update the model attribute below
         
     | 
| 
       127 
     | 
    
         
            -
                  # _model.id = 1
         
     | 
| 
       128 
     | 
    
         
            -
                  # update the expected value (hash) below
         
     | 
| 
       129 
     | 
    
         
            -
                  # expected = {id: 1, name: '', tags: []}
         
     | 
| 
       130 
     | 
    
         
            -
                  # expect(api_client.object_to_hash(_model)).to eq(expected)
         
     | 
| 
       131 
     | 
    
         
            -
                end
         
     | 
| 
       132 
     | 
    
         
            -
              end
         
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
              describe '#build_collection_param' do
         
     | 
| 
       135 
     | 
    
         
            -
                let(:param) { ['aa', 'bb', 'cc'] }
         
     | 
| 
       136 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new }
         
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
                it 'works for csv' do
         
     | 
| 
       139 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
         
     | 
| 
       140 
     | 
    
         
            -
                end
         
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
                it 'works for ssv' do
         
     | 
| 
       143 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
         
     | 
| 
       144 
     | 
    
         
            -
                end
         
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
                it 'works for tsv' do
         
     | 
| 
       147 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
         
     | 
| 
       148 
     | 
    
         
            -
                end
         
     | 
| 
       149 
     | 
    
         
            -
             
     | 
| 
       150 
     | 
    
         
            -
                it 'works for pipes' do
         
     | 
| 
       151 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
         
     | 
| 
       152 
     | 
    
         
            -
                end
         
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
                it 'works for multi' do
         
     | 
| 
       155 
     | 
    
         
            -
                  expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
         
     | 
| 
       156 
     | 
    
         
            -
                end
         
     | 
| 
       157 
     | 
    
         
            -
             
     | 
| 
       158 
     | 
    
         
            -
                it 'fails for invalid collection format' do
         
     | 
| 
       159 
     | 
    
         
            -
                  expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
         
     | 
| 
       160 
     | 
    
         
            -
                end
         
     | 
| 
       161 
     | 
    
         
            -
              end
         
     | 
| 
       162 
     | 
    
         
            -
             
     | 
| 
       163 
     | 
    
         
            -
              describe '#json_mime?' do
         
     | 
| 
       164 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new }
         
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       167 
     | 
    
         
            -
                  expect(api_client.json_mime?(nil)).to eq false
         
     | 
| 
       168 
     | 
    
         
            -
                  expect(api_client.json_mime?('')).to eq false
         
     | 
| 
       169 
     | 
    
         
            -
             
     | 
| 
       170 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/json')).to eq true
         
     | 
| 
       171 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
         
     | 
| 
       172 
     | 
    
         
            -
                  expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
         
     | 
| 
       173 
     | 
    
         
            -
             
     | 
| 
       174 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/xml')).to eq false
         
     | 
| 
       175 
     | 
    
         
            -
                  expect(api_client.json_mime?('text/plain')).to eq false
         
     | 
| 
       176 
     | 
    
         
            -
                  expect(api_client.json_mime?('application/jsonp')).to eq false
         
     | 
| 
       177 
     | 
    
         
            -
                end
         
     | 
| 
       178 
     | 
    
         
            -
              end
         
     | 
| 
       179 
     | 
    
         
            -
             
     | 
| 
       180 
     | 
    
         
            -
              describe '#select_header_accept' do
         
     | 
| 
       181 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new }
         
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       184 
     | 
    
         
            -
                  expect(api_client.select_header_accept(nil)).to be_nil
         
     | 
| 
       185 
     | 
    
         
            -
                  expect(api_client.select_header_accept([])).to be_nil
         
     | 
| 
       186 
     | 
    
         
            -
             
     | 
| 
       187 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
         
     | 
| 
       188 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
         
     | 
| 
       189 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
         
     | 
| 
       190 
     | 
    
         
            -
             
     | 
| 
       191 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
         
     | 
| 
       192 
     | 
    
         
            -
                  expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
         
     | 
| 
       193 
     | 
    
         
            -
                end
         
     | 
| 
       194 
     | 
    
         
            -
              end
         
     | 
| 
       195 
     | 
    
         
            -
             
     | 
| 
       196 
     | 
    
         
            -
              describe '#select_header_content_type' do
         
     | 
| 
       197 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new }
         
     | 
| 
       198 
     | 
    
         
            -
             
     | 
| 
       199 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       200 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(nil)).to be_nil
         
     | 
| 
       201 
     | 
    
         
            -
                  expect(api_client.select_header_content_type([])).to be_nil
         
     | 
| 
       202 
     | 
    
         
            -
             
     | 
| 
       203 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
         
     | 
| 
       204 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
         
     | 
| 
       205 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
         
     | 
| 
       206 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
         
     | 
| 
       207 
     | 
    
         
            -
                  expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
         
     | 
| 
       208 
     | 
    
         
            -
                end
         
     | 
| 
       209 
     | 
    
         
            -
              end
         
     | 
| 
       210 
     | 
    
         
            -
             
     | 
| 
       211 
     | 
    
         
            -
              describe '#sanitize_filename' do
         
     | 
| 
       212 
     | 
    
         
            -
                let(:api_client) { RancherApi::ApiClient.new }
         
     | 
| 
       213 
     | 
    
         
            -
             
     | 
| 
       214 
     | 
    
         
            -
                it 'works' do
         
     | 
| 
       215 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('sun')).to eq('sun')
         
     | 
| 
       216 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
         
     | 
| 
       217 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
         
     | 
| 
       218 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
         
     | 
| 
       219 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
         
     | 
| 
       220 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
         
     | 
| 
       221 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
         
     | 
| 
       222 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
         
     | 
| 
       223 
     | 
    
         
            -
                  expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
         
     | 
| 
       224 
     | 
    
         
            -
                end
         
     | 
| 
       225 
     | 
    
         
            -
              end
         
     | 
| 
       226 
     | 
    
         
            -
            end
         
     | 
    
        data/spec/configuration_spec.rb
    DELETED
    
    | 
         @@ -1,42 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            describe RancherApi::Configuration do
         
     | 
| 
       16 
     | 
    
         
            -
              let(:config) { RancherApi::Configuration.default }
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              before(:each) do
         
     | 
| 
       19 
     | 
    
         
            -
                # uncomment below to setup host and base_path
         
     | 
| 
       20 
     | 
    
         
            -
                # require 'URI'
         
     | 
| 
       21 
     | 
    
         
            -
                # uri = URI.parse("https://api.phoenixnap.com/solutions/rancher/v1beta")
         
     | 
| 
       22 
     | 
    
         
            -
                # RancherApi.configure do |c|
         
     | 
| 
       23 
     | 
    
         
            -
                #   c.host = uri.host
         
     | 
| 
       24 
     | 
    
         
            -
                #   c.base_path = uri.path
         
     | 
| 
       25 
     | 
    
         
            -
                # end
         
     | 
| 
       26 
     | 
    
         
            -
              end
         
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
              describe '#base_url' do
         
     | 
| 
       29 
     | 
    
         
            -
                it 'should have the default value' do
         
     | 
| 
       30 
     | 
    
         
            -
                  # uncomment below to test default value of the base path
         
     | 
| 
       31 
     | 
    
         
            -
                  # expect(config.base_url).to eq("https://api.phoenixnap.com/solutions/rancher/v1beta")
         
     | 
| 
       32 
     | 
    
         
            -
                end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
                it 'should remove trailing slashes' do
         
     | 
| 
       35 
     | 
    
         
            -
                  [nil, '', '/', '//'].each do |base_path|
         
     | 
| 
       36 
     | 
    
         
            -
                    config.base_path = base_path
         
     | 
| 
       37 
     | 
    
         
            -
                    # uncomment below to test trailing slashes
         
     | 
| 
       38 
     | 
    
         
            -
                    # expect(config.base_url).to eq("https://api.phoenixnap.com/solutions/rancher/v1beta")
         
     | 
| 
       39 
     | 
    
         
            -
                  end
         
     | 
| 
       40 
     | 
    
         
            -
                end
         
     | 
| 
       41 
     | 
    
         
            -
              end
         
     | 
| 
       42 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,70 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
            require 'json'
         
     | 
| 
       15 
     | 
    
         
            -
            require 'date'
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            # Unit tests for RancherApi::ClusterConfiguration
         
     | 
| 
       18 
     | 
    
         
            -
            # Automatically generated by openapi-generator (https://openapi-generator.tech)
         
     | 
| 
       19 
     | 
    
         
            -
            # Please update as you see appropriate
         
     | 
| 
       20 
     | 
    
         
            -
            describe RancherApi::ClusterConfiguration do
         
     | 
| 
       21 
     | 
    
         
            -
              let(:instance) { RancherApi::ClusterConfiguration.new }
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              describe 'test an instance of ClusterConfiguration' do
         
     | 
| 
       24 
     | 
    
         
            -
                it 'should create an instance of ClusterConfiguration' do
         
     | 
| 
       25 
     | 
    
         
            -
                  expect(instance).to be_instance_of(RancherApi::ClusterConfiguration)
         
     | 
| 
       26 
     | 
    
         
            -
                end
         
     | 
| 
       27 
     | 
    
         
            -
              end
         
     | 
| 
       28 
     | 
    
         
            -
              describe 'test attribute "token"' do
         
     | 
| 
       29 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       30 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       31 
     | 
    
         
            -
                end
         
     | 
| 
       32 
     | 
    
         
            -
              end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
              describe 'test attribute "tls_san"' do
         
     | 
| 
       35 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       36 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       37 
     | 
    
         
            -
                end
         
     | 
| 
       38 
     | 
    
         
            -
              end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
              describe 'test attribute "etcd_snapshot_schedule_cron"' do
         
     | 
| 
       41 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       42 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       43 
     | 
    
         
            -
                end
         
     | 
| 
       44 
     | 
    
         
            -
              end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
              describe 'test attribute "etcd_snapshot_retention"' do
         
     | 
| 
       47 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       48 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       49 
     | 
    
         
            -
                end
         
     | 
| 
       50 
     | 
    
         
            -
              end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
              describe 'test attribute "node_taint"' do
         
     | 
| 
       53 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       54 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       55 
     | 
    
         
            -
                end
         
     | 
| 
       56 
     | 
    
         
            -
              end
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
              describe 'test attribute "cluster_domain"' do
         
     | 
| 
       59 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       60 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       61 
     | 
    
         
            -
                end
         
     | 
| 
       62 
     | 
    
         
            -
              end
         
     | 
| 
       63 
     | 
    
         
            -
             
     | 
| 
       64 
     | 
    
         
            -
              describe 'test attribute "certificates"' do
         
     | 
| 
       65 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       66 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       67 
     | 
    
         
            -
                end
         
     | 
| 
       68 
     | 
    
         
            -
              end
         
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,52 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
            require 'json'
         
     | 
| 
       15 
     | 
    
         
            -
            require 'date'
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            # Unit tests for RancherApi::ClusterWorkloadConfiguration
         
     | 
| 
       18 
     | 
    
         
            -
            # Automatically generated by openapi-generator (https://openapi-generator.tech)
         
     | 
| 
       19 
     | 
    
         
            -
            # Please update as you see appropriate
         
     | 
| 
       20 
     | 
    
         
            -
            describe RancherApi::ClusterWorkloadConfiguration do
         
     | 
| 
       21 
     | 
    
         
            -
              let(:instance) { RancherApi::ClusterWorkloadConfiguration.new }
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              describe 'test an instance of ClusterWorkloadConfiguration' do
         
     | 
| 
       24 
     | 
    
         
            -
                it 'should create an instance of ClusterWorkloadConfiguration' do
         
     | 
| 
       25 
     | 
    
         
            -
                  expect(instance).to be_instance_of(RancherApi::ClusterWorkloadConfiguration)
         
     | 
| 
       26 
     | 
    
         
            -
                end
         
     | 
| 
       27 
     | 
    
         
            -
              end
         
     | 
| 
       28 
     | 
    
         
            -
              describe 'test attribute "name"' do
         
     | 
| 
       29 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       30 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       31 
     | 
    
         
            -
                end
         
     | 
| 
       32 
     | 
    
         
            -
              end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
              describe 'test attribute "server_count"' do
         
     | 
| 
       35 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       36 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       37 
     | 
    
         
            -
                end
         
     | 
| 
       38 
     | 
    
         
            -
              end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
              describe 'test attribute "server_type"' do
         
     | 
| 
       41 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       42 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       43 
     | 
    
         
            -
                end
         
     | 
| 
       44 
     | 
    
         
            -
              end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
              describe 'test attribute "location"' do
         
     | 
| 
       47 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       48 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       49 
     | 
    
         
            -
                end
         
     | 
| 
       50 
     | 
    
         
            -
              end
         
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
            end
         
     | 
| 
         @@ -1,46 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            =begin
         
     | 
| 
       2 
     | 
    
         
            -
            #Rancher Solution API
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            #Simplify enterprise-grade Kubernetes cluster operations and management with Rancher on Bare Metal Cloud. Deploy Kubernetes clusters using a few API calls.<br> <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/rancher-bmc-integration-kubernetes' target='_blank'>here</a> </span><br> <br> <b>All URLs are relative to (https://api.phoenixnap.com/solutions/rancher/v1beta)</b> 
         
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
            The version of the OpenAPI document: 0.1
         
     | 
| 
       7 
     | 
    
         
            -
            Contact: support@phoenixnap.com
         
     | 
| 
       8 
     | 
    
         
            -
            Generated by: https://openapi-generator.tech
         
     | 
| 
       9 
     | 
    
         
            -
            OpenAPI Generator version: 6.1.0
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            =end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            require 'spec_helper'
         
     | 
| 
       14 
     | 
    
         
            -
            require 'json'
         
     | 
| 
       15 
     | 
    
         
            -
            require 'date'
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            # Unit tests for RancherApi::NodePoolSshConfig
         
     | 
| 
       18 
     | 
    
         
            -
            # Automatically generated by openapi-generator (https://openapi-generator.tech)
         
     | 
| 
       19 
     | 
    
         
            -
            # Please update as you see appropriate
         
     | 
| 
       20 
     | 
    
         
            -
            describe RancherApi::NodePoolSshConfig do
         
     | 
| 
       21 
     | 
    
         
            -
              let(:instance) { RancherApi::NodePoolSshConfig.new }
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
              describe 'test an instance of NodePoolSshConfig' do
         
     | 
| 
       24 
     | 
    
         
            -
                it 'should create an instance of NodePoolSshConfig' do
         
     | 
| 
       25 
     | 
    
         
            -
                  expect(instance).to be_instance_of(RancherApi::NodePoolSshConfig)
         
     | 
| 
       26 
     | 
    
         
            -
                end
         
     | 
| 
       27 
     | 
    
         
            -
              end
         
     | 
| 
       28 
     | 
    
         
            -
              describe 'test attribute "install_default_keys"' do
         
     | 
| 
       29 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       30 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       31 
     | 
    
         
            -
                end
         
     | 
| 
       32 
     | 
    
         
            -
              end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
              describe 'test attribute "keys"' do
         
     | 
| 
       35 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       36 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       37 
     | 
    
         
            -
                end
         
     | 
| 
       38 
     | 
    
         
            -
              end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
              describe 'test attribute "key_ids"' do
         
     | 
| 
       41 
     | 
    
         
            -
                it 'should work' do
         
     | 
| 
       42 
     | 
    
         
            -
                  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
         
     | 
| 
       43 
     | 
    
         
            -
                end
         
     | 
| 
       44 
     | 
    
         
            -
              end
         
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
            end
         
     |