This document describes the relevant changes between releases of the OCM API SDK.
-
Update model to v0.0.140:
-
Add check_optional_terms to TermsReview and SelfTermsReview
-
Add reduceClusterList to ResourceReview and SelfResourceReview
-
Changes in this release are mainly intended to simplify packaging of the SDK in Fedora, see issue #421 for details.
-
Use
golang-jwt/jwt
instead ofdgrijalva/jwt-go
.The
dgrijalva/jwt-go
library is no longer maintained andgolang-jwt/jwt
is a community maintained fork. See dgrijalva/jwt-go#462 for detailts.Parts of the public interface of the SDK use this library, so this is a backwards compatibility breaking change. Projects using the SDK will need to switch to the new library, specially if they are using the
context.ContextWithToken
orcontext.TokenFromContext
functions. The change should only require changing the import paths, as the fork is fully compatible with the original library.A simple way to do the required changes is the following command:
$ find . -name '*.go' | xargs sed -i 's|dgrijalva/jwt-go|golang-jwt/jwt|'
This also addresses CVE-2020-26160, but that vulnerability doesn’t currently affect the SDK because the authentication handler doesn’t use the
aud
claim. -
Use microcosm-cc/bluemonday instead of grokify/html-strip-tags-go for HTML sanitizing.
-
Use json-iterator/go instead of c0b/go-ordered-json to ensure ordered JSON in debug output.
-
Update model to v0.0.137:
-
Add Cluster Resource Type
-
Remove Cluster Deployment GET
-
-
Update to version 0.0.38 of the metamodel in order to fix a conflict between
github.com/golang/glog
andgithub.com/istio/glog
that prevents building packages that use the SDK.
-
Fix initialization of metrics registerer.
-
Update model to v0.0.135:
-
Add user name to service log
LogEntry
.
-
-
Update model to v0.0.132
-
Added Disable workload monitoring
-
add authorizations feature review and self feature review models.
-
add locators for feature review and self feature review
-
Add ccs_only flag for cloud regions
-
-
Update ocm-api-model to v0.0.129
-
Add cloud provider inquiries to api-model
-
sts: Add support role ARN
-
-
Update model to v0.0.128
-
Remove the Dashboards resource.
-
Add CCSOnly, GenericName fields to machine type.
-
Add AcceleratedComputing value to MachineTypeCategory enum.
-
-
Update model to v0.0.126
-
Add ClusterConfigurationMode type under ClusterStatus
-
sts: Change custom roles to instance roles
-
-
Update
Logger
interface to include aFatal
log level.-
Fatal level will call
os.Exit(1)
after writing the message. -
Fatal level is always active.
-
Important
|
This version breaks backwards compatibility in the Logger
interface, as all implementations now require a Fatal method to be implemented.
|
-
Bump ocm-api-model to v0.0.115
-
Add event_code and site_code to TermsReviewRequest type
-
Add new SelfTermsReviewRequest type
-
-
Bump ocm-api-model to v0.0.114
-
related-resources: Add resource type and cloud provider
-
event: Track ad-hoc authenticated events
-
-
Move token logic to separate transport wrapper.
-
Use defaults from authentication package.
-
Update to model 0.0.113:
-
Add RelatedResources struct to QuotaCost.
-
-
Move client selection logic to separate type
-
Update ocm-api-model to v0.0.112
-
Add Options to AddOnParameter type.
-
aws: Support PrivateLink for fully-private clusters
-
-
Fix wrong TLS server name (issue 356).
-
Change default user agent to
OCM-SDK
. -
Update to model 0.0.111:
-
Add subscription metrics.
-
Add
deprovision
andforce
parameters to delete cluster method. -
Ensure all subscription fields are available.
-
-
Enable compression.
-
Remove logger from metrics transport wrapper.
-
Reorder execution of tests.
-
Add metrics handler wrapper.
-
Add
h2c
support. -
Enable HTTP/2.
-
Update to model 0.0.109:
-
Remove deprecated 'upgrade_channel_group' field.
-
-
Run tests in parallel.
-
Add documentation of upgrade policy states.
-
Improve testing of metrics.
-
Update to model 0.0.108:
-
Add
billing_model
attribute to theReservedResource
type. -
Add
cluster_billing_model
attribute to theSubscriptioin
type.
-
-
Downgrade from Go 1.15 to Go 1.14. This has been requested by users of the SDK that can’t upgrade to Go 1.15 because it isn’t available in RHEL 8 and because of the issues that Go 1.15 introduces related to the obsolete
CN
attribute of X.509 certificates. The only negative effect of this downgrade is that timeouts or deadlines set for requests sent using TLS over Unix sockets will be ignored.
-
Accept Empty Reader as non-nil req body
-
Missplaced return after warning from send
-
Add trusted CA certificates for Windows
-
Update metamodel to v0.0.36:
-
Use Go 1.15
-
Add
documentedSupport
andnamedSupport
-
Add
typedSupport
-
Make reporter streams configurable
-
Add presence bitmap
-
-
Update model to v0.0.106:
-
Add billing_model field to cluster type
-
subscriptions: Add label locator
-
-
Update to model 0.0.105:
-
Add cluster hibernation support
-
-
Declare go 1.15 in go.mod
-
connection: Skip loading SystemCertPool on Windows
-
Update to model 0.0.103:
-
Remove
cluster_admin_enabled
attribute from cluster type. -
Add missing subscription, cluster authorization and plan attributes.
-
-
Add support for customizing the error responses of the authentication handler.
-
Add support for connecting to the server using Unix sockets.
-
Update model to v0.0.102
-
add default value to add-on parameter type
-
Add upgrade channel group for a cluster
-
-
Move logging code to
logging
package -
Rename
Metrics
toMetricsSubsystem
-
Add method to read metrics subsystem
-
Load metrics subsystem configuration from file
-
Load string if it doesn’t look like a file
-
Load
os.Stdin
in dump configuration example -
Reject URLs without scheme or host name
-
Add redirection tests
-
update model to 0.0.101
-
Fix issue in the method that returns the URL of a connection: it was returning an empty string when no alternative URLs were configured.
-
Add support for alternative URLs.
-
Add support for loading trusted CA files.
-
Add suppott for loading configuration from YAML file.
-
Add
EvaluateTemplate
function for tests -
Don’t crash in debug mode deserializing an empty response
-
Update model to v0.0.99
-
Add deletion add-on installation endpoint
-
Add Update method to addon installation resource
-
-
Update metamodel tp v0.0.35
-
Update to version 4.8 of Antlr
-
Wrap errors
-
-
Allow disabling keep alive connections in the SDK connection transport
-
Update api-model to v0.0.94
-
version: Rename field from MOA to ROSA
-
[AMS] Add IncludeRedHatAssociates to SubscriptionNotify
-
-
Update api-model to v0.0.91
-
Remove redudant fields
-
flavours: Remove infra and compute nodes
-
Add AddOnParameter modal type Update AddOn to include list of AddOnParameters
-
Add AddOnInstallationParameter modal type Update AddOnInstallation to include list of AddOnInstallationParameters
-
-
Update api-model to v0.0.90
-
Add machine pools locator
-
Add compute node labels
-
-
Interpret HTML entities in logged summary of error response
-
Use new limits for content summary
-
Update metamodel to v0.0.34
-
Support numeric initialisms
-
-
Update api-model to v0.0.86
-
Added New Error Message implementation
-
idp: Add HTPasswd provider
-
Uptdating SDK with GCP credentials
-
-
increase the limit/size of content summary
-
Update metamodel to v0.0.33
-
json: Support NoContent on POST responses
-
-
Update model to v0.0.83
-
add external resources to add on type model
-
SDA-2952 - Add "hidden" option to AddOn
-
Update to model v0.0.81 Add key to label_type Remove ID from upgrade label
Also included as part of model v0.0.80 Add upgrade policy type and resource Add terms review and self terms review ** Add dashboards summary
Update to model v0.0.79 Add 'available_upgrades' list to version type Add CCS type and Attribute to Cluster type
-
Remove get tokens on first attempt log entry
-
Update to metamodel v0.0.32
-
Update to model v0.0.77
-
Add ChannelGroup attribute to version
-
Add avaialble AWS regions method
-
-
Better logging and metrics when retrying SSO
-
Assume expiration is 0 when missing in the token
-
Update to model v0.0.75
-
Added support_case resource
-
Added token_authorization to root_resource
-
-
Update to model v0.0.73
-
[CS] Add hive_config to the provision shard
-
[CS] Improving cluster logs endpoint
-
[AMS] Added token authorization endpoint
-
-
Added support for http PUT method
-
Update to model v0.0.73
-
Add capability_review endpoint
-
Add support_cases endpoint
-
-
Update to metamodel v0.0.31
-
Adding List type to checkUpdate validator
-
-
Update to model v0.0.72
-
Fix comment
-
Expose if a region supports multi AZ
-
Add Update Identity Provider
-
removing 'deprovision' suffix from logs endpoint
-
add post method to subscription resource
-
Add labels field to external configuration type
-
Implement Batch Patch Ingresses API endpoint
-
-
Update to model v0.0.71
-
Add API for getting cluster’s provision shard
-
Add API for getting provision shards
-
-
Update to model v0.0.70
-
Add API for custerdeployment labels
-
add organization_id to cluster_registration
-
label: Fix erroneous file extensions
-
MachineType: Expose instance size enum
-
-
Update to model v0.0.69
-
Added top level sku_rules endpoint to AMS
-
Change the feature toggle API to be /feature_toggles/id/query using POST with org id as context
-
-
Update to model v0.0.66
-
Change feature toggle query to be POST with payload containing organization ID
-
-
Update to model v0.0.65
-
Added Uninstall Log
-
Added syncset API
-
Update to metamodel v0.0.30
-
-
Update to model v0.0.63
-
cluster: Remove support for expiration_timestamp
-
Added top-level Notify endpoint to AMS
-
-
Update to metamodel v0.0.29:
-
pr_check: Lock in dependency versions for test pipeline
-
Fix setter for Poll request params
-
-
Update to model v0.0.62:
-
Add subscription notify endpoint
-
-
Update to model v0.0.61:
-
accounts_mgmt: Add 'fields' parameter to all list-requests
-
accounts_mgmt: Support for Labels resources
-
-
Update to model v0.0.60:
-
Add parameters 'offset' and 'tail' to log resource
-
-
Update to model v0.0.58
-
AddOns: Add docs_link attribute
-
Update to metamodel v0.0.28
-
-
Update to model v0.0.57:
-
AddOnInstallations: Remove DELETE operation
-
Added Label to Account
-
-
Update to metamodel v0.0.28:
-
OpenAPI: Fix expected response
-
-
Update to model 0.0.55
-
Add enabled field to region
-
Adding metrics.nodes to api model
-
Adding cluster ingresses endpoint
-
ClusterNodes: Add ComputeMachineType
-
Network: Added HostPrefix
-
-
Update to model 0.0.54
-
Add HealthState field to Cluster type
-
Refactor alerts and operator conditions to contain only 'CriticalAlerts' and 'OperatorsConditionFailing'
-
Adding computeNodesSockets to cluster metrics
-
Fix pull secret deletion path
-
Remove unsupported cluster state
-
Add machine type category
-
-
Update to metamodel 0.0.27
-
Update file header year to 2020
-
-
Update to model 0.0.53
-
Add pull secret deletion
-
Products: Add product attribute to cluster object
-
Products: Support for top-level cluster types
-
Add ClusterOperatorsConditions type
-
Add ClusterAlertsFiring type and field in ClusterMetrics
-
-
Update to model 0.0.47:
-
Add ClusterAdminEnabled flag.
-
Add PullSecrets endpoint.
-
Fix
LDAPIdentityProvider
attribute name.
-
-
Update to model 0.0.46:
-
Add missing fields for add-on installation
-
Add operator name to add-ons
-
-
Request new tokens when the OpenID server returns error code
invalid_grant
during the refresh token grant. -
Check that responses from the OpenID server contain
application/json
in theContent-Type
header, and improve the error messages generated in that case so that they contain a summary of the content. -
Honor cookies sent by the OpenID and API servers.
-
Update to metamodel 0.0.26.
The more relevant change in the new version of the metamodel is the new
operation_id
attribute added to error objects and error messages. An error object like this:{ "kind": "Error", "id": "401", "href": "/api/clusters_mgmt/v1/errors/401", "code": "CLUSTERS-MGMT-401", "reason": "My reason", "operation_id": "456" }
Will result in the following error string (in one single line):
identifier is '401', code is 'CLUSTERS-MGMT-401' and operation identifier is '456': My reason
This addresses issue 150.
-
Remove service and version parameters from the builder of the authentication handler. This is a backwards compatibility breaking change that requires changes in the code that creates the authentication handler. For example, if the current code is like this:
handler, err := authentication.NewHandler(). Logger(logger). Service("clusters_mgmt"). Version("v1"). Public("..."). KeysFile("..."). KeysURL("..."). ACLFile("..."). Next(next). Build() if err != nil { ... }
It will need to be changed to this:
handler, err := authentication.NewHandler(). Logger(logger). Public("..."). KeysFile("..."). KeysURL("..."). ACLFile("..."). Next(next). Build() if err != nil { ... }
Note that the only change required is removing the calls to the
Service
andVersion
methods of the builder. The handler will now extract those values from the request URL.This is specially important for programs that use the same authentication handler for multiple services.
-
Update to metamodel 0.0.25:
-
Run the
gofmt
command only once for all generated files instead of running it once per each generated file. -
Avoid generating code with constructs that would then be simplified by the
-s
flag of thegofmt
command.
-
-
Preserver order of attributes of JSON documents sent to the log when debug mode is enabled.
-
Update to metamodel 0.0.24:
-
Add
Content-Type
to responses sent by the generated server code. -
Don’t require developer to explicitly remove the
/api
when using the server code. -
Remove redundant quotes from error responses sent by the generated server code.
-
-
Update to model 0.0.41:
-
Add
target_namespace
andinstall_mode
attributes toAddOn
type. -
Add
state
attribute toAWSInfrastructureAccessRole
type.
-
-
Update to metamodel 0.0.23:
-
Fix missing OpenAPI paths due to incorrect use of
append
.
-
-
Check content type of HTTP responses and return an error if it isn’t JSON.
-
Update to model 0.0.39:
-
Add types and resources for cluster operator metrics.
-
Add
deleting
andremoved
states to AWS infrastructure access role grant status.
-
-
Update to model 0.0.38:
-
Add
search
andorder
parameters to the method that lists registry credentials. -
Add
labels
parameter to the method that lists subscriptions. -
Add types and resources for management of AWS infrastructure access roles.
-
-
Add ability to intercept request and response using a transport middleware of type
http.RoundTripper
.
-
Update to metamodel 0.0.22:
-
Fix generation of OpenAPI paths so that all the characters are lower case.
-
-
Fix URL prefix for the logs service.
-
Update to metamodel 0.0.21:
-
Use JSON iterator instead of the default JSON Go package.
-
-
Don’t require Go 1.13.
-
Update to model 0.0.37:
-
Add new
service_logs
service. -
Add types and resources for machine types.
-
-
Update to model 0.0.36:
-
Add types and resources for AWS infrastructure access roles.
-
Add GCP flavour and change AWS flavour to contain also the instance type.
-
-
Update to model 0.0.33:
-
Add the
CreatedAt
andUpdatedAt
attributes to theSubscription
type.
-
-
Authentication handler sends 401 instead of 511.
-
Authentication handler sends the
WWW-Authenticate
response header. -
Authentication handler doesn’t send authentication failures to the log.
-
Update to metamodel 0.0.20:
-
Fix conversion of errors to JSON so that the
kind
attribute is generated correctly.
-
-
Add authentication handler.
-
Update to model 0.0.27:
-
Add
resource_name
andresource_cost
attributes to the add-on type.
-
-
Update to model 0.0.26:
-
Remove obsolete
aws
andversion
fields from theFlavour
type. -
Add instance type fields to the
Flavour
type. -
Add
AWSVolume
andAWSFlavour
types. -
Add attributes required for BYOC.
-
Fix direction of
Body
parameters of updates.
-
-
Update to metamodel 0.0.18:
-
Add stage URL and
securitySchemes
to the generated OpenAPI specifications.
-
-
Update to model 0.0.24:
-
Fix directions of paging parameters.
-
Fix direction of
Body
parameter ofUpdate
. -
Add default values to paging parameters.
-
Update to metamodel 0.0.17.
-
-
Update to metamodel 0.0.17:
-
Add semantic checks.
-
Add support for default values.
-
Check default values of paging parameters.
-
-
Update to model 0.0.21:
-
Added add-on resources and types.
-
Added subscription reserved resources collection.
-
-
Drop support for developers.redhat.com.
-
Update to metamodel 0.0.14:
-
Add
Poll
method to clients that have aGet
method.
-
-
Update to model 0.0.20:
-
Query resource quota from root and delete by identifier.
-
-
Update to metamodel 0.0.13:
-
Fix imports of
helpers
anderrors
packages.
-
-
Update to model 0.0.17:
-
Added
Disconnected
,DisplayName
andExternalClusterID
attributes to the cluster authorization request type.
-
-
Update to model 0.0.16:
-
Added
ResourceReview
resource to the authorizations service.
-
-
Update to metamodel 0.0.11:
-
Improve parsing of initialisms.
-
Fix the method not allowed code.
-
Send not found when server returns
nil
target. -
Generate service and version servers.
-
Don’t generate files with execution permission.
-
-
Upate to model 0.0.13:
-
Added
AccessTokenAuth
type. -
Added
auths
attribute toAccessToken
type.
-
-
Update to metamodel 0.0.9:
-
Generate shorter adapter names.
-
Use constants from the
http
package. -
Shorter read and write names.
-
Rename
SetStatusCode
toStatus
. -
Improve naming of variables.
-
Set default status.
-
Move errors and helpers generators to separate files.
-
-
Update to model 0.0.9:
-
Add
type
attribute to theResourceQuota
type. -
Add
config_managed
attribute to theRoleBinding
type.
-
-
Update to model 0.0.7:
-
Add
search
parameter to theList
method of the subscriptions resource.
-
-
Update to model 0.0.6:
-
Remove the
creator
attribute of theCluster
type.
-
-
Update to metamodel 0.0.7:
-
Add
Copy
method to builders.
-
-
Update to model 0.0.5:
-
Add
order
parameter to the methods to list accounts and subscriptions.
-
-
Use access token that is about to expire if there is no other mechanism to obtain a new one.
-
Update to model 0.0.3:
-
Add
order
parameter to the collections that suport it. -
Add cloud providers collection.
-
-
Update to model 0.0.2:
-
Add
DisplayName
attribute toSubscription
type.
-
-
Update to metamodel 0.0.5:
-
Fix generation of field names for query parameters.
-
Remove
query
andpath
fields from request objects. -
Remove unused imports.
-
-
Makefile generates code using the ocm-api-metamodel v0.0.4.
-
Generated servers parse request query parameters.
-
Generated servers enforce no trailing slashes as well send 'Content-Type` header.
-
Generated servers can handle routes with and without trailing slashes.
-
Clone metamodel for code generation
-
Clone model for code generation
-
Rename main package
-
Add generated servers.
-
Changes ClusterRegistration response type from long to string .
-
Add support for quota summary.
-
Fix the data type of the cluster registration expiration date.
-
Automatically select the deprecated OpenID server when authenticating with user name and password.
-
Don’t send warnings about toke issuer when no tokens are used.
-
Fix the names of the methods used to set the V values of the
glog
logger.
-
Added methods to get connection attributes like token URL, client identifier, etc.
-
Added
GetMethod
andGetPath
methods to HTTP requests. -
Added
Header
method to HTTP responses.
-
Added support for the
name
attribute of theDashboard
type. -
Added to lists a new
Get
method to get elements by index.
-
Added to response types getter methods that return the value of the parameter and a boolean flag that indicates if there is actually a value.
-
Improved support for contexts, adding the
BuildContext
,TokensContext
andSendContext
methods.
Important
|
This version breaks backwards compatibility in the Logger
interface, as all the methods require now a first ctx parameter.
|
-
Moved basic cluster metrics to the
metrics
attribute. -
Added
Empty
method to lists and struct typess.
-
Change the
glog
logger so that it uses--v=0
for errors, warnings and information messages and--v=1
for debug messages.
-
Renamed the project from
api-client
touhc-sdk
. -
Moved the command line tool to a new
uhc-cli
project.
-
Add
context
andtimeout
parameters to all requests. -
Scrub password from debug log.