tnc-ba / strongTNC

BYOD TNC Database Management Tool
GNU Affero General Public License v3.0
0 stars 0 forks source link

Issue170 swid measurement controller #195

Closed cfaessler closed 10 years ago

cfaessler commented 10 years ago
Drop table "swid_tags";
CREATE TABLE "swid_tags" (
    "id" integer NOT NULL PRIMARY KEY,
    "package_name" varchar(255) NOT NULL,
    "version" varchar(32) NOT NULL,
    "unique_id" varchar(255) NOT NULL,
    "swid_xml" text NOT NULL,
    "software_id" varchar(255) NOT NULL
);
curl -i -X POST http://localhost:8000/api/sessions/2/swid_measurement/ -H "Content-Type: application/json" -d '["regid.2004-03.org.strongswan_debian_7.4-x86_64-strongswan-4.5.2-1.5+deb7u3"]' -u root:root

(The "regid.2004-03.org.strongswan_debian_7.4-x86_64-strongswan-4.5.2-1.5+deb7u3" software-id exists in our repo db.)

dbrgn commented 10 years ago

There seems to be a lot of magic in the autorouting stuff of DRF. I am really not shure where to put this controller. Maybe you can come up with a better solution?

Routing of actions is documented here http://www.django-rest-framework.org/api-guide/routers#extra-link-and-actions and here http://www.django-rest-framework.org/api-guide/routers#defaultrouter

cfaessler commented 10 years ago

@dbrgn can you please review again?

dbrgn commented 10 years ago

@dbrgn can you please review again?

Done.