Skip to content

Commit

Permalink
Merge pull request #15 from waggle-sensor/SAGE-1631-port-sensor-hardw…
Browse files Browse the repository at this point in the history
…are-metadata

SAGE-1631 Port Sensor Hardware Metadata to beekeper manifest
  • Loading branch information
iperezx authored Apr 7, 2023
2 parents a8c7b8f + 0258b98 commit 638f0e3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions manifests/migrations/0004_computehardware_description_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.1.8 on 2023-04-07 18:09

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('manifests', '0003_computesensor_serial_no_computesensor_uri_and_more'),
]

operations = [
migrations.AddField(
model_name='computehardware',
name='description',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='resourcehardware',
name='description',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='sensorhardware',
name='description',
field=models.TextField(blank=True),
),
]
1 change: 1 addition & 0 deletions manifests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class AbstractHardware(models.Model):
manufacturer = models.CharField(max_length=255, default="", blank=True)
datasheet = models.CharField(max_length=255, default="", blank=True)
capabilities = models.ManyToManyField("Capability", blank=True)
description = models.TextField(blank=True)

class Meta:
abstract = True
Expand Down
1 change: 1 addition & 0 deletions manifests/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def serialize_common_hardware(h):
"manufacturer": h.manufacturer,
"datasheet": h.datasheet,
"capabilities": [cap.capability for cap in h.capabilities.all()],
"description": h.description,
}


Expand Down

0 comments on commit 638f0e3

Please sign in to comment.