Skip to content

realm-management: Astarte allows the installation of interfaces aggregated with endpoints having different options #1072

@joshuachp

Description

@joshuachp

When installing interfaces with astartectl sync it's possible to install the following interface:

{
  "interface_name": "io.edgehog.devicemanager.apps.CreateVolumeRequest",
  "version_major": 0,
  "version_minor": 1,
  "type": "datastream",
  "ownership": "server",
  "aggregation": "object",
  "mappings": [
    {
      "endpoint": "/volume/id",
      "type": "string",
      "database_retention_policy": "use_ttl",
      "database_retention_ttl": 31556952,
      "reliability": "guaranteed",
      "description": "Create Volume Request id",
      "doc": "Unique id for the volume."
    },
    {
      "endpoint": "/volume/deploymentId",
      "type": "string",
      "database_retention_policy": "use_ttl",
      "database_retention_ttl": 600,
      "reliability": "guaranteed",
      "description": "Reference to a Deployment using the volume",
      "doc": "The deployment in which the volume is used, so the device can send deployment events to Astarte for the create request"
    },
    {
      "endpoint": "/volume/driver",
      "type": "string",
      "database_retention_policy": "use_ttl",
      "database_retention_ttl": 31556952,
      "reliability": "guaranteed",
      "description": "Volume driver name",
      "doc": "Name of the volume driver to use."
    },
    {
      "endpoint": "/volume/options",
      "type": "stringarray",
      "database_retention_policy": "use_ttl",
      "database_retention_ttl": 31556952,
      "reliability": "guaranteed",
      "description": "Volume driver options",
      "doc": "An array of key=value options to set for the driver."
    }
  ]
}

Where the endpoint /volume/deploymentId has a different database_retention_ttl from the other ones.

The interface editor in the dashboard will also show an error, because it will change the endpoint database_retention_ttl to another value.

The astartectl validate interface command doesn't raise any error when validating the interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions