Skip to content

Instantly share code, notes, and snippets.

@AdamSaleh
Created February 17, 2014 13:16
Show Gist options
  • Save AdamSaleh/9050303 to your computer and use it in GitHub Desktop.
Save AdamSaleh/9050303 to your computer and use it in GitHub Desktop.
from robottelo.api.apicrud import ApiCrud
from robottelo.common import records
from robottelo.records.operatingsystem import OperatingSystem
class ArchitectureApi(ApiCrud):
api_path = "/api/architectures/"
api_json_key = u"architecture"
create_fields = ["name", "operatingsystem_ids"]
class Architecture(records.Record):
name = records.StringField(required=True)
operatingsystem = records.ManyRelatedField(OperatingSystem, 1, 3)
class Meta:
api_class = ArchitectureApi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment