Skip to content

Commit

Permalink
OPCT-181: Added the platformName field when External (#54)
Browse files Browse the repository at this point in the history
On OCP 4.13 we are introducing PlatformType `External`, it requires a
field `PlatformName` to be filled on the infrastructure object.

This PR export this field to the `report` command, allowing to check the
user-defined `platformName` value.

https://issues.redhat.com/browse/OPCT-181

Blockers:
- [x]
#55
- [x]
#60

scenarios:

- `report` with a single artifact from Platform External cluster:

```
$ ./openshift-provider-cert-linux-amd64 report \
  ocp4.13-nightly_UPI_External_202303172104_sonobuoy_adee7267-e433-4c1e-886d-63486b20bbaa.tar.gz
> OpenShift Provider Certification Summary <

 Kubernetes API Server version		: v1.26.2+bc894ae
 OpenShift Container Platform version	: 4.13.0-0.nightly-2023-03-11-033820
 - Cluster Update Progressing		: False
 - Cluster Target Version		: Cluster version is 4.13.0-0.nightly-2023-03-11-033820
						
 OCP Infrastructure:			
 - PlatformType				: External (oci)
 - Name					: oci-t13-7kb2h
 - Topology				: HighlyAvailable
 - ControlPlaneTopology			: HighlyAvailable

```

- `report` with a single artifact from Platform External cluster and
'other' (`None`) as a baseline:

```
$ ./openshift-provider-cert-linux-amd64 report \
  ocp4.13-nightly_UPI_External_202303172104_sonobuoy_adee7267-e433-4c1e-886d-63486b20bbaa.tar.gz \
  -b ocp4.12_UPI_202303201604_sonobuoy_61a9a863-682a-4415-980f-ff3b61f15efa.tar.gz

> OpenShift Provider Certification Summary <

 Kubernetes API Server version		: v1.26.2+bc894ae							: v1.25.7+eab9cc9
 OpenShift Container Platform version	: 4.13.0-0.nightly-2023-03-11-033820					: 4.12.8
 - Cluster Update Progressing		: False									: False
 - Cluster Target Version		: Cluster version is 4.13.0-0.nightly-2023-03-11-033820			: Cluster version is 4.12.8
														
 OCP Infrastructure:												
 - PlatformType				: External (oci)							: None
 - Name					: oci-t13-7kb2h								: oci-t15-g5kc8
 - Topology				: HighlyAvailable							: HighlyAvailable
 - ControlPlaneTopology			: HighlyAvailable							: HighlyAvailable

```

- `report` with a single artifact from other Platform type (`None`)
cluster and 'other' (`External`) as a baseline:

```
$./openshift-provider-cert-linux-amd64 report \
  -b ocp4.13-nightly_UPI_External_202303172104_sonobuoy_adee7267-e433-4c1e-886d-63486b20bbaa.tar.gz \
  ocp4.12_UPI_202303201604_sonobuoy_61a9a863-682a-4415-980f-ff3b61f15efa.tar.gz

> OpenShift Provider Certification Summary <

 Kubernetes API Server version		: v1.25.7+eab9cc9							: v1.26.2+bc894ae
 OpenShift Container Platform version	: 4.12.8								: 4.13.0-0.nightly-2023-03-11-033820
 - Cluster Update Progressing		: False									: False
 - Cluster Target Version		: Cluster version is 4.12.8						: Cluster version is 4.13.0-0.nightly-2023-03-11-033820
														
 OCP Infrastructure:												
 - PlatformType				: None									: External (oci)
 - Name					: oci-t15-g5kc8								: oci-t13-7kb2h
 - Topology				: HighlyAvailable							: HighlyAvailable

```
  • Loading branch information
mtulio committed Apr 11, 2023
1 parent 85dfec9 commit f13478f
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 338 deletions.
61 changes: 30 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,56 @@ module github.com/redhat-openshift-ecosystem/provider-certification-tool
go 1.19

require (
github.com/openshift/api v0.0.0-20210910062324-a41d3573a3ba
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142
github.com/openshift/api v0.0.0-20230330150608-05635858d40f // github.com/openshift/api@release-4.13
github.com/openshift/client-go v0.0.0-20230120202327-72f107311084 // github.com/openshift/client-go@release-4.13
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v1.4.0
github.com/spf13/viper v1.11.0
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.8.0
github.com/vmware-tanzu/sonobuoy v0.56.10
github.com/xuri/excelize/v2 v2.6.1
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
k8s.io/api v0.23.6
k8s.io/apimachinery v0.23.6
k8s.io/client-go v0.23.6
k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1
k8s.io/client-go v0.26.1
)

require (
cloud.google.com/go/compute v1.5.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/briandowns/spinner v1.6.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.7 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -71,23 +70,23 @@ require (
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8 // indirect
golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

0 comments on commit f13478f

Please sign in to comment.