def _get_script_details_fields(): return { 'script_id': fields.Integer, 'name': fields.String, 'content': fields.String, 'modified_on': customfields.CustomDateTime, 'uri': BpUrl(api_restful, ScriptApi, absolute=True) }
def _get_layer_details_fields(): return { 'layer_id' : fields.Integer, 'name' : fields.String, 'tag' : fields.String, 'content' : fields.String, 'parent_id' : fields.Integer(default=None), # Make sure we actually get "null" and not "0" 'modified_on' : fields.DateTime(dt_format='iso8601'), 'uri' : BpUrl(api_restful, LayerApi, absolute=True) }
def _get_instance_fields(): return { 'instance_id': fields.Integer, 'clouddef_id': fields.Integer, 'hostname': fields.String, 'comment': fields.String, 'provider_id': fields.String, 'provider_name': fields.String, 'status': fields.String, 'uri': BpUrl(api_restful, InstanceApi, absolute=True) }
def _get_dataprovider_fields(): return { 'datadef_id' : fields.Integer, 'name' : fields.String, 'dataprovider_id' : fields.Integer(default=None), 'source' : fields.String, 'source_path_filter' : fields.String, 'source_filename_filter' : fields.String, 'destination' : fields.String, 'uri' : BpUrl(api_restful, DataProviderApi, absolute=True) }
def _get_instance_fields(): return { 'job_id': fields.Integer, 'clouddef_id': fields.Integer, 'run_layer_id': fields.Integer(default=None), 'script_id': fields.Integer(default=None), 'source_datadef_id': fields.Integer(default=None), 'destination_datadef_id': fields.Integer(default=None), 'name': fields.String, 'task_timeout': fields.Integer, 'uri': BpUrl(api_restful, JobApi, absolute=True) }
def _get_cloud_fields(): return { 'clouddef_id': fields.Integer, 'name': fields.String, 'cloudprovider_id': fields.Integer( default=None), # Make sure we actually get "null" and not "0" 'virtual_device_layer_id': fields.Integer( default=None), # Make sure we actually get "null" and not "0" 'test_layer_id': fields.Integer( default=None), # Make sure we actually get "null" and not "0" 'snapshot_id': fields.String, 'snapshot_image_id': fields.String, 'client_startup_parameters': fields.String, 'uri': BpUrl(api_restful, CloudApi, absolute=True) }
def _get_task_fields(): return { 'task_id': fields.Integer, 'job_id': fields.Integer, 'filename': fields.String, 'backend_id': fields.String, 'worker_hostname': fields.String, 'created_on': fields.DateTime, 'completed': fields.Boolean, 'output': fields.String, 'build_logs': fields.String, 'exception': fields.String, 'traceback': fields.String, 'exit_code': fields.String, 'duration': fields.Float, 'uri': BpUrl(api_restful, TaskApi, absolute=True) }
def _get_dataprovidertype_fields(): return { 'dataprovider_id': fields.Integer, 'name': fields.String, 'uri': BpUrl(api_restful, DatProviderTypeList, absolute=True) }
def _get_cloudtype_fields(): return { 'cloudprovider_id': fields.Integer, 'name': fields.String, 'uri': BpUrl(api_restful, CloudTypeList, absolute=True) }