Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan output should have type, not kind #186

Merged
merged 1 commit into from
Jul 2, 2018
Merged

Conversation

edaniszewski
Copy link
Contributor

fixes a bug in the scan output found by @MatthewHink where the type field displayed the device kind, not the type.

added unit test, and did a test locally with a modified emulator -- you see that the scan reports the type as temperature, but the capabilities endpoint shows the full kind as test.temperature

edaniszewski ~/dev/vaporio/synse-server (scan-type-output *) ➜ curl localhost:5000/synse/2.1/scan
{
  "racks":[
    {
      "id":"rack-1",
      "boards":[
        {
          "id":"vec",
          "devices":[
            {
              "id":"34c226b1afadaae5f172a4e1763fd1a6",
              "info":"Synse Humidity Sensor",
              "type":"humidity"
            },
            {
              "id":"52d8a14a77478f9163f78c39e228a524",
              "info":"Synse Temperature Sensor 1",
              "type":"temperature"
            },
            {
              "id":"1565c28442f21c9e9e9a2bb542950edf",
              "info":"Synse Temperature Sensor 2",
              "type":"temperature"
            },
            {
              "id":"b5b86f361e76835879bd9d85f012e5d1",
              "info":"Synse Temperature Sensor 4",
              "type":"temperature"
            },
            {
              "id":"df6a06d6e28da8aab0c25ee41688fd1c",
              "info":"Synse Airflow Sensor",
              "type":"airflow"
            },
            {
              "id":"12835beffd3e6c603aa4dd92127707b5",
              "info":"Synse Fan",
              "type":"fan"
            },
            {
              "id":"12ea5644d052c6bf1bca3c9864fd8a44",
              "info":"Synse LED",
              "type":"led"
            },
            {
              "id":"bcf0618c50bff9121cb10d141d66f46f",
              "info":"Synse backup LED",
              "type":"led"
            },
            {
              "id":"e385de0e2b5d16af5e34167d479fc766",
              "info":"Synse Pressure Sensor 1",
              "type":"pressure"
            },
            {
              "id":"f838b2d6afceb01e7a2634893f6f935c",
              "info":"Synse Pressure Sensor 2",
              "type":"pressure"
            },
            {
              "id":"907c0f333db803271c837a37548a5331",
              "info":"Synse Temperature Sensor 3",
              "type":"temperature"
            },
            {
              "id":"92a8c6e1f4cfb206c38910965f545b03",
              "info":"Synse Temperature Sensor 5",
              "type":"temperature"
            }
          ]
        }
      ]
    }
  ]
}
edaniszewski ~/dev/vaporio/synse-server (scan-type-output *) ➜ curl localhost:5000/synse/2.1/capabilities
[
  {
    "plugin":"vaporio\/emulator-plugin",
    "devices":[
      {
        "kind":"fan",
        "outputs":[
          "fan.speed"
        ]
      },
      {
        "kind":"led",
        "outputs":[
          "led.state",
          "led.color"
        ]
      },
      {
        "kind":"pressure",
        "outputs":[
          "pressure"
        ]
      },
      {
        "kind":"test.temperature",
        "outputs":[
          "temperature"
        ]
      },
      {
        "kind":"airflow",
        "outputs":[
          "airflow"
        ]
      },
      {
        "kind":"humidity",
        "outputs":[
          "humidity",
          "temperature"
        ]
      }
    ]
  }
]

@edaniszewski edaniszewski merged commit f4efcd8 into sdk1.0 Jul 2, 2018
@edaniszewski edaniszewski deleted the scan-type-output branch July 2, 2018 16:58
edaniszewski added a commit that referenced this pull request Jul 2, 2018
* start to update internal grpc client for sdk1.0 changes

* update internal grpc client handling

* add capabilities route

* update models, update tests

* update plugins route to include metadata and health info

* update plugin registration flow. still needs to be cleaned up, tests need to be updated/added

* add support for service discovery via kubernetes service endpointswith labels

* update deployment configurations, fix bug in unix registration

* update tests for plugin flow changes

* update api docs

* use new synse_grpc package

* more doc updates, fix serialization bug

* user guide docs update

* update user guide docs

* fix bug where no returned reading would cause failure (#178)

* Change read scheme to allow multiple readings of the same type (#181)

* update read scheme to allow multiple readings of the same type from the same device (e.g. a single device might provide multiple voltage readings)

* update api docs

* Fix build args for old docker versions (#183)

* fix build args for old docker version

* update comment

* scan output should have type, not kind (#186)

* final updates
edaniszewski pushed a commit to edaniszewski/synse-server that referenced this pull request Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant