BoxGrinder REST | Artifacts

    Artifacts

    In BoxGrinder REST there are three artifacts:

     

    There is also a special case artifact: Error. It can be produced on every request – if an Error artifact is returned it means that request wasn't successfully processed.

    Artifact States

    There are several states in which a resource could be. All states and transitions between those states are shown below.

    artifacts.png

    Node states are not shown above because there are not very useful.

    Appliance actions
    • build – executed in state NEW triggers a new build and produces a new base Image,
    • destroy – executed in state NEW or ERROR destroys (removes) an appliance.
    Image actions
    • deliver – executed in state BUILT or CONVERTED delivers image using selected delivery type. It can be also executed in state ERROR, where previous_status is DELIVERING,
    • convert – executed in state BUILT triggers converting to another format and creating another Image artifact.,
    • destroy – executed in states CREATED, DELIVERED, CONVERTED or ERROR removes image. All dependent images will be also removed!

    Data Types

     

    Name
    Fields
    Statuses
    Appliance
    • id – id of an appliance,
    • name  – unique name,
    • summary – short description of an appliance,
    • created_at  – definition creation date,
    • updated_at – last modification  date,
    • status – current definition status,
    • config –  appliance definition file in YAML format.
    NEW,  CREATED, REMOVING, ERROR
    Image
    • id  – id of an image.
    • appliance_id – appliance id
    • node_id –  id of a node where this image was built,
    • parent – image id of a  parent (base) image,
    • name – appliance name,
    • summary –  short description of an image,
    • created_at – image creation date,
    • updated_at  – last modification date,
    • status – current image status,
    • previous_status  – previous image status.
    NEW, BUILDING, CONVERTING,  BUILT, CONVERTED, REMOVING, DELIVERING, DELIVERED, ERROR
    Node
    • id – id of the node,
    • name  – unique name generated by the node,
    • status – current status,
    • address  – IP address of the node,
    • os_name – OS name installed on the  node,
    • os_version – OS version installed on the node,
    • arch  – architecture
    ACTIVE, INACTIVE