Created
February 17, 2014 13:16
-
-
Save AdamSaleh/9050303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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