Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classes:
description: Root class for an application description.
attributes:
apiVersion:
description: Identifier of the version of the API the object definition follows.
description: Same as the Margo's OpenAPI specification version and follow semantic versioning.
required: true
range: string
rank: 10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of kind field
# Invalid kind of Kubernetes custom resource.
apiVersion: margo.org/v1-alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
# `kind` != `ApplicationDescription`
kind: SomethingErroneous
id: com-northstartida-hello-world
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of id field
# Invalid id format being defined in this test
apiVersion: margo.org/v1-alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDescription
id: an-incorrect-id-with-special-chars**&%
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: margo.org/v1-alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDescription
id: com-northstartida-hello-world
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: margo.org/v1-alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDescription
id: com-northstartida-digitron-orchestrator
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classes:
description: A class representing the desired state of an entity.
attributes:
apiVersion:
description: Identifier of the version of the API the object definition follows.
description: Same as the Margo's OpenAPI specification version and follow semantic versioning.
required: true
range: string
rank: 10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of kind field
# Invalid kind of Kubernetes custom resource.
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
# `kind` != `ApplicationDeployment`
kind: SomethingErroneous
id: a3e2f5dc-912e-494f-8395-52cf3769bc06
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of spec.applicationId
# Invalid characters being used.
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be v1.0.0-rc.2
Corresponding to v1.0.0-rc.2

kind: ApplicationDeployment
id: a3e2f5dc-912e-494f-8395-52cf3769bc06
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of spec.applicationId
# Too long.
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be v1.0.0-rc.2
Corresponding to v1.0.0-rc.2

kind: ApplicationDeployment
id: a3e2f5dc-912e-494f-8395-52cf3769bc06
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Demonstrates validation of id field
# Not a valid UUID.
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be v1.0.0-rc.2
Corresponding to v1.0.0-rc.2

kind: ApplicationDeployment
# id is not a valid UUID
id: this-is-definitively-not-a-uuid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDeployment
id: a3e2f5dc-912e-494f-8395-52cf3769bc06
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDeployment
id: ad9b614e-8912-45f4-a523-372358765def
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDeployment
id: ad9b614e-8912-45f4-a523-372358765def
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDeployment
id: ad9b614e-8912-45f4-a523-372358765def
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ This section defines the structure and YAML schema of an `ApplicationDeployment`
{% if schema.description %}{{ schema.description }}{% endif %}

```yaml
apiVersion: application.margo.org/v1alpha1
apiVersion: 1.0.0
Comment thread
vireshnavalli marked this conversation as resolved.
Outdated
kind: ApplicationDeployment
id:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ POST /api/v1/clients/{clientId}/deployments/{deploymentId}/status

| Fields | Type | Required? | Description |
|-----------------|-----------------|-----------------|-----------------|
| apiVersion | string | Y | Identifier of the version the API resource follows.|
| kind | string | Y | Must be `DeploymentStatusManifest`.|
| deploymentId | string | Y | The unique identifier UUID of the deployment specification. Needs to be assigned by the Workload Fleet Management Software. |
| deviceId | string | N* | Id of the device hosting the deployment. Includes the full device hierarchy if applicable. <br/> * This attribute is required when reporting on behalf of a child-device. |
Expand Down Expand Up @@ -88,7 +87,6 @@ When the error used is a reserved code for a gateway-generated error, the `sourc

```json
{
"apiVersion": "deployment.margo.org/v1alpha1",
"kind": "DeploymentStatusManifest",
"deploymentId": "a3e2f5dc-912e-494f-8395-52cf3769bc06",
"deviceId": "plant-alfa-zone1-edge01",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ DELETE /api/v1/clients/{clientId}/capabilities/{deviceId}

| Field | Type | Required? | Description |
|-----------------|-----------------|-----------------|-----------------|
| apiVersion | string | Y | Identifier of the version the API resource follows.|
| kind | string | Y | Must be `DeviceCapabilitiesManifest`.|
| properties | Properties | Y | Element that defines characteristics about the device. See the [Properties Fields](#properties-attributes) section below. |

Expand Down Expand Up @@ -130,7 +129,6 @@ These enumerations are used as vocabularies for attribute values of the `DeviceC

```json
{
"apiVersion": "device.margo.org/v1alpha1",
"kind": "DeviceCapabilitiesManifest",
"properties": {
"id": "northstarida.xtapro.k8s.edge",
Expand Down Expand Up @@ -198,7 +196,6 @@ A WFM client reporting the "Gateway" role MUST report its own capabilities to th
```
```json
{
"apiVersion": "device.margo.org/v1alpha1",
"kind": "DeviceCapabilitiesManifest",
"properties": {
"id": "gateway1",
Expand All @@ -219,8 +216,7 @@ A WFM client reporting the "Gateway" role MUST report its own capabilities to th
```
```json
{
"apiVersion": "device.margo.org/v1alpha1",
"kind": "DeviceCapabilitiesManifest",
"kind": "DeviceCapabilitiesManifest",
"properties": {
"id": "gateway1",
"vendor": "Gateway Vendor",
Expand Down Expand Up @@ -257,8 +253,7 @@ A WFM client reporting the "Gateway" role MUST report its own capabilities to th
```
```json
{
"apiVersion": "device.margo.org/v1alpha1",
"kind": "DeviceCapabilitiesManifest",
"kind": "DeviceCapabilitiesManifest",
"properties": {
"id": "gateway1/deviceA",
"vendor": "Device A Vendor",
Expand Down Expand Up @@ -300,8 +295,7 @@ A WFM client reporting the "Gateway" role MUST report its own capabilities to th
```
```json
{
"apiVersion": "device.margo.org/v1alpha1",
"kind": "DeviceCapabilitiesManifest",
"kind": "DeviceCapabilitiesManifest",
"properties": {
"id": "gateway1/path1/deviceA",
"vendor": "Device A Vendor",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@ POST /api/v1/onboarding

| Fields | Type | Required? | Description |
|-----------------|-----------------|-----------------|-----------------|
| apiVersion | string | Y | Identifier of the version the API resource follows.|
| kind | string | Y | Must be `OnboardingRequest`.|
| certificate | string | Y | Base64-encoded X.509 certificate of the client. |

### Example Request Body

```json
{
"apiVersion": "onboarding.margo.org/v1alpha1",
"kind": "OnboardingRequest",
"certificate": "MIIDdzCCAl+gAwIBAgIEb1...<truncated Base64 X.509 cert>...."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ paths:
application/json:
schema:
type: object
required: [apiVersion, kind, certificate]
required: [kind, certificate]
properties:
apiVersion:
type: string
description: API version identifier
kind:
type: string
enum: [OnboardingRequest]
Expand Down Expand Up @@ -470,10 +467,8 @@ components:
$ref: '#/components/schemas/DeploymentManifestRef'
DeviceCapabilitiesManifest:
type: object
required: [apiVersion, kind, properties]
required: [kind, properties]
properties:
apiVersion:
type: string
kind:
type: string
enum: [DeviceCapabilitiesManifest]
Expand Down Expand Up @@ -553,10 +548,8 @@ components:

DeploymentStatusManifest:
type: object
required: [apiVersion, kind, deploymentId, status, components]
required: [kind, deploymentId, status, components]
properties:
apiVersion:
type: string
kind:
type: string
enum: [DeploymentStatusManifest]
Expand Down Expand Up @@ -614,7 +607,7 @@ components:
properties:
apiVersion:
type: string
default: margo.org
default: 1.0.0
description: API version
kind:
type: string
Expand Down
Loading