Amanda::Rest::Storages -- Rest interface to Amanda::Storage
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/create
reply:
HTTP status: 200 OK
[
{
"code" : "1100027",
"dir" : "/amanda/h1/vtapes2",
"message" : "Created vtape root '/amanda/h1/vtapes2'",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/disk.pm",
"source_line" : "158"
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/inventory
reply:
HTTP status: 200 OK
[
{
"chg_name" : "my_robot",
"code" : "1100000",
"message" : "The inventory",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "368",
"storage_name" : "my_robot",
"inventory" : [
{
"device_error" : null,
"device_status" : 0,
"f_type" : 1,
"label" : "robot-E01001L4",
"slot" : "1",
"state" : 1
},
{
"device_error" : null,
"device_status" : 0,
"f_type" : 1,
"label" : "robot-E01002L4",
"slot" : "2",
"state" : 1
},
...
]
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/load?slot=SLOT
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/load?label=LABEL
reply:
HTTP status: 200 OK
[
{
"chg_name" : "my_vtapes",
"code" : "1100002",
"load_result" : {
"datestamp" : "20140120174846",
"device_status" : 0,
"f_type" : 1,
"label" : "test-ORG-AA-vtapes-001"
},
"message" : "load result",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "468",
"storage_name" : "my_vtapes"
}
]
or
[
{
"chg_name" : "my_vtapes",
"code" : "1100002",
"load_result" : {
"device_error" : "File 0 not found",
"device_status" : 8,
"device_status_error" : "Volume not labeled"
},
"message" : "load result",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "517",
"storage_name" : "my_vtapes"
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/reset
reply:
HTTP status: 200 OK
[
{
"chg_name" : "my_vtapes",
"code" : "1100003",
"message" : "Changer is reset",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "588",
"storage_name" : "my_vtapes"
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/eject?drive=DRIVE
reply:
HTTP status: 200 OK
[
{
"chg_name" : "my_robot",
"code" : "1100004",
"drive" : "1",
"message" : "Drive '1' ejected",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "705",
"storage_name" : "my_robot"
}
]
or
[
{
"code" : 3,
"message" : "drive '0' is empty",
"reason" : "invalid",
"severity" : 16,
"source_filename" : "unknown",
"source_line" : 0,
"type" : "failed"
}
]
or
[
{
"code" : 3,
"message" : "'chg-disk:' does not support eject",
"reason" : "notimpl",
"severity" : 16,
"source_filename" : "unknown",
"source_line" : 0,
"type" : "failed"
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/clean?drive=DRIVE
reply:
HTTP status: 200 OK
[
{
"code" : 3,
"message" : "'chg-robot:' does not support clean",
"reason" : "notimpl",
"severity" : 16,
"source_filename" : "unknown",
"source_line" : 0,
"type" : "failed"
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/verify
reply:
HTTP status: 200 OK
[
{
"code" : "1100006",
"device_name" : "tape:/dev/nst0",
"drive" : "0",
"message" : "Drive 0 is device tape:/dev/nst0",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1731"
},
{
"code" : "1100006",
"device_name" : "tape:/dev/nst1",
"drive" : "1",
"message" : "Drive 1 is device tape:/dev/nst1",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1731"
},
{
"code" : "1100025",
"device_name" : "tape:/dev/nst12",
"drive" : "3",
"error" : "Can't open tape device /dev/nst12: No such file or directory",
"message" : "Drive 3: device 'tape:/dev/nst12' error: Can't open tape device /dev/nst12: No such file or directory",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1722"
},
{
"code" : "1100009",
"device_name" : "tape:/dev/nst3",
"drive" : "2",
"message" : "Drive 2 is not device tape:/dev/nst3",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1714"
},
{
"code" : "1100007",
"device_name" : "tape:/dev/nst2",
"drive" : "2",
"message" : "Drive 2 looks to be device tape:/dev/nst2",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1741"
},
{
"code" : "1100008",
"message" : "property \"TAPE-DEVICE\" \"0=tape:/dev/nst0\" \"1=tape:/dev/nst1\" \"2=tape:/dev/nst2\" \"3=tape:/dev/nst3\"",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1778",
"tape_devices" : " \"0=tape:/dev/nst0\" \"1=tape:/dev/nst1\" \"2=tape:/dev/nst2\" \"3=tape:/dev/nst3\""
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/show
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/show?slots=3..5
reply:
HTTP status: 200 OK
[
{
"code" : "1100010",
"message" : "scanning all 20 slots in changer:",
"num_slots" : "20",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer.pm",
"source_line" : "1634"
},
{
"code" : "1100015",
"datestamp" : "20140120174913",
"label" : "test-ORG-AA-vtapes-003",
"message" : "slot 3: date 20140120174913 label test-ORG-AA-vtapes-003",
"severity" : "16",
"slot" : "3",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer.pm",
"source_line" : "1708",
"write_protected" : ""
},
{
"code" : "1100015",
"datestamp" : "20140120191101",
"label" : "test-ORG-AA-vtapes-004",
"message" : "slot 4: date 20140120191101 label test-ORG-AA-vtapes-004",
"severity" : "16",
"slot" : "4",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer.pm",
"source_line" : "1708",
"write_protected" : ""
},
{
"code" : "1100015",
"datestamp" : "20140120191153",
"label" : "test-ORG-AA-vtapes-005",
"message" : "slot 5: date 20140120191153 label test-ORG-AA-vtapes-005",
"severity" : "16",
"slot" : "5",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer.pm",
"source_line" : "1708",
"write_protected" : ""
}
]
request:
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/update
POST /amanda/v1.0/configs/:CONF/storages/:STORAGE/update?changed=CHANGED
reply:
HTTP status: 200 OK
[
{
"code" : "1100019",
"message" : "scanning slot 1",
"severity" : "16",
"slot" : "1",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Changer/robot.pm",
"source_line" : "1346"
},
...
{
"chg_name" : "my_robot",
"code" : "1100018",
"message" : "Update completed",
"severity" : "16",
"source_filename" : "/usr/lib/amanda/perl/Amanda/Rest/Storages.pm",
"source_line" : "1084",
"storage_name" : "my_robot"
}
]
This page was automatically generated Tue Mar 19 07:08:16 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.