Project

General

Profile

Task #2392

Story #2387: refactor CLI commands to correspond to API

Ensure that CLI commands correspond to API methods.

Added by Andrew Pippin over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Andrew Pippin
Category:
d1_client_cli
Start date:
2012-02-23
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

History

#1 Updated by Andrew Pippin over 12 years ago

Go through the commands in the CLI and the methods in the API and make sure that the names match. If not, collect a list for review.

#2 Updated by Andrew Pippin over 12 years ago

There are now 35 commands in the "CLI":https://repository.dataone.org/software/cicore/trunk/itk/d1_client_cli/doc/build/html/reference.html#commands (including the EOF command):

  • do_addblocked(self, line):
  • do_addpreferred(self, line):
  • do_allowpublic(self, line):
  • do_allowreplication(self, line):
  • do_allow(self, line):
  • do_clearreplication(self, line):
  • do_clear(self, line):
  • do_create(self, line):
  • do_data(self, line):
  • do_delete(self, line):
  • do_denyall(self, line):
  • do_denypublic(self, line):
  • do_deny(self, line):
  • do_disallowreplication(self, line):
  • do_EOF(self, line):
  • do_exit(self, line):
  • do_fields(self, line):
  • do_get(self, line):
  • do_help(self, line):
  • do_history(self, line):
  • do_list(self, line):
  • do_load(self, line):
  • do_log(self, line):
  • do_meta(self, line):
  • do_related(self, line):
  • do_remove(self, line):
  • do_reset(self, line):
  • do_resolve(self, line):
  • do_save(self, line):
  • do_search(self, line):
  • do_setaccess(self, line):
  • do_setreplicas(self, line):
  • do_setreplication(self, line):
  • do_set(self, line):
  • do_update(self, line):

#3 Updated by Andrew Pippin over 12 years ago

h2. API methods are:

{background:#ddd}. |\3. "Member nodes":http://mule1.dataone.org/ArchitectureDocs-current/apis/MN_APIs.html |
| Tier | REST | Function |
| 1 | GET /monitor/ping | MNCore.ping() |
| 1 | GET /log | MNCore.getLogRecords() |
| 1 | GET / and GET /node | MNCore.getCapabilities() |
| 1 | GET /object/{pid} | MNRead.get() |
| 1 | GET /meta/{pid} | MNRead.getSystemMetadata() |
| 1 | HEAD /object/{pid} | MNRead.describe() |
| 1 | GET /checksum/{pid}[?checksumAlgorithm={checksumAlgorithm}] | MNRead.getChecksum() |
| 1 | GET /object[?fromDate={fromDate}&toDate={toDate}&formatid={formatId}&replicaStatus={replicaStatus}&start={start}&count={count}] | MNRead.listObjects() |
| 1 | POST /error | MNRead.synchronizationFailed() |
| 2 | GET /isAuthorized/{pid}?action={action} | MNAuthorization.isAuthorized() |
| 3 | POST /object | MNStorage.create() |
| 3 | PUT /object/{pid} | MNStorage.update() |
| 3 | DELETE /object/{pid} | MNStorage.delete() |
| 2 | POST /dirtySystemMetadata | MNStorage.systemMetadataChanged() |
| 4 | POST /replicate | MNReplication.replicate() |
| 4 | GET /replica/{pid} | MNReplication.getReplica() |
{background:#ddd}. |\3. "Coordinating Nodes":http://mule1.dataone.org/ArchitectureDocs-current/apis/CN_APIs.html |
| Tier | REST | Function |
| 1 | GET /monitor/ping | CNCore.ping() |
| 1 | POST /object | CNCore.create() |
| 1 | GET /formats | CNCore.listFormats() |
| 1 | GET /formats/{formatId} | CNCore.getFormat() |
| 1 | GET /log?[fromdate={fromDate}][&todate={toDate}][&event={event}][&start={start}][&count={count}] | CNCore.getLogRecords() |
| 1 | POST /reserve | CNCore.reserveIdentifier() |
| 1 | POST /generate | CNCore.generateIdentifier() |
| 1 | GET /checksum | CNCore.listChecksumAlgorithms() |
| ? | PUT /obsoletedBy/{pid} | CNCore.setObsoletedBy() |
| 1 | GET /node | CNCore.listNodes() |
| 1 | POST /meta | CNCore.registerSystemMetadata() |
| ? | GET /reserve/{pid}?subject={subject} | CNCore.hasReservation() |
| 1 | GET /object/{pid} | CNRead.get() |
| 1 | GET /meta/{pid} | CNRead.getSystemMetadata() |
| 1 | HEAD /object/{pid} | CNRead.describe() |
| 1 | GET /resolve/{pid} | CNRead.resolve() |
| 1 | GET /checksum/{pid} | CNRead.getChecksum() |
| 1 | GET /object[?fromDate={fromDate}&toDate={toDate}&formatid= {formatId}&replicaStatus={replicaStatus}&start={start}&count={count}] | CNRead.listObjects() |
| 1 | GET /search/{queryType}/{query} | CNRead.search() |
| 2 | PUT /owner/{pid} | CNAuthorization.setRightsHolder() |
| 2 | GET /isAuthorized/{pid}?action={action} | CNAuthorization.isAuthorized() |
| 2 | PUT /accessRules/{pid} | CNAuthorization.setAccessPolicy() |
| 2 | POST /accounts | CNIdentity.registerAccount() |
| 2 | PUT /accounts/{subject} | CNIdentity.updateAccount() |
| 2 | PUT /accounts/verification/{subject} | CNIdentity.verifyAccount() |
| 2 | GET /accounts/{subject} | CNIdentity.getSubjectInfo() |
| 2 | GET /accounts?query={query}[&status={status}&start={start}&count={count}] | CNIdentity.listSubjects() |
| 2 | POST /accounts/map | CNIdentity.mapIdentity() |
| 2 | DELETE /accounts/map/{subject} | CNIdentity.removeMapIdentity() |
| 2 | POST /accounts/pendingmap | CNIdentity.requestMapIdentity() |
| 2 | PUT /accounts/pendingmap/{subject} | CNIdentity.confirmMapIdentity() |
| 2 | GET /accounts/pendingmap/{subject} | CNIdentity.getPendingMapIdentity() |
| 2 | DELETE /accounts/pendingmap/{subject} | CNIdentity.denyMapIdentity() |
| 2 | POST /groups | CNIdentity.createGroup() |
| 2 | PUT /groups | CNIdentity.updateGroup() |
| 4 | PUT /replicaNotifications/{pid} | CNReplication.setReplicationStatus() |
| 4 | PUT /replicaMetadata/{pid} | CNReplication.updateReplicationMetadata() |
| 4 | PUT /replicaPolicies/{pid} | CNReplication.setReplicationPolicy() |
| 4 | GET /replicaAuthorizations/{pid}?targetNodeSubject={targetNodeSubject} | CNReplication.isNodeAuthorized() |
| ? | PUT /removeReplicaMetadata/{pid} | CNReplication.deleteReplicationMetadata() |
| 2 | PUT /node/{nodeid} | CNRegister.updateNodeCapabilities() |
| 2 | POST /node | CNRegister.register() |

#4 Updated by Andrew Pippin over 12 years ago

| CLI Command | API call |
|\2. +CLI+ |
| exit |=. - |
| history |=. - |
| help |=. - |
| EOF |=. - |
|\2. +Session Parameters+ |
| reset |=. - |
| load |=. - |
| save |=. - |
| -get- show |=. - |
| set |=. - |
| clear |=. - |
|\2. +Access Policy+ |
| allow |=. - |
| deny |=. - |
| allowpublic |=. - |
| denypublic |=. - |
| denyall |=. - |
|\2. +Replication Policy+ |
| clearreplication |=. - |
| addpreferred |=. - |
| addblocked |=. - |
| remove |=. - |
| allowreplication |=. - |
| disallowreplication |=. - |
| setreplicas |=. - |
|\2. +Searching+ |
| search | CNRead.search() |
| fields |=. - |
|\2. +Science Object Operations+ |
| -data- get | MNRead.get() |
| meta | MNRead.getSystemMetadata() |
| create | MNStorage.create() |
| update | MNStorage.update() |
| delete | MNStorage.delete() |
| resolve | CNRead.resolve() |
| list | CNRead.listObjects() |
| log | MNCore.getLogRecords() |
| setaccess | CNAuthorization.setAccessPolicy() |
| setreplication | CNReplication.setReplicationPolicy() |

#5 Updated by Andrew Pippin over 12 years ago

  • Status changed from New to Closed

Renamed "@get@" command (display session variable) to "@show@".
Renamed "@data@" command to "@get@" to correspond to MNRead.get()/CNRead.get() method call.

#6 Updated by Andrew Pippin over 12 years ago

  • % Done changed from 0 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)