oracle / oci-ruby-sdk

Ruby SDK for Oracle Cloud Infrastructure
https://cloud.oracle.com/cloud-infrastructure
Other
25 stars 22 forks source link

Certificate parsing error #71

Open AskarZinurov opened 1 year ago

AskarZinurov commented 1 year ago

I am trying to fetch ssl certificate via get_certificate method and observing error:

irb(main):099:0> cert_client.get_certificate("ocid1.certificate.oc1.eu-blah-blah")
/usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:59:in `convert_to_type': uninitialized constant OCI::CertificatesManagement::Models::VersionStage (NameError)

            type = OCI.const_get(type.to_s)                                  
                      ^^^^^^^^^^                                             
Did you mean?  OCI::CertificatesManagement::Models::VERSION_STAGE_FAILED     
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `block (2 levels) in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `map'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:238:in `block in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:231:in `each_pair'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate_version_summary.rb:231:in `build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:68:in `block in convert_to_type'
        from <internal:kernel>:90:in `tap'                                   
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:67:in `convert_to_type'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:462:in `block in build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:450:in `each_pair'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/certificates_management/models/certificate.rb:450:in `build_from_hash'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:68:in `block in convert_to_type'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/internal/util.rb:67:in `convert_to_type'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/api_client.rb:572:in `deserialize'
        from /usr/local/bundle/gems/oci-2.18.0/lib/oci/api_client.rb:462:in `handle_success_response'
        ... 14 levels...

The same error occurs on every api call, which is expected to parse certificate response, i.e. certificate creation and update.

KartikShrikantHegde commented 1 year ago

Thanks for reporting the issue, we will ask the concerned team to take a look and get back to you.