Project Admin CLI Requirements

Login

  • Preconditions:
    • Not logged in
  • Primary flow
    • Valid username and password: login succeeds (200)
  • Alternate flows
    • If already logged in, secondary login still succeeds (200)
    • Invalid username/password: login fails (401)

Logout

  • Preconditions
    • Logged in
  • Primary flow:
    • User is logged out

 

Add/Update service:

  • Preconditions:
    • Admin user
  • Primary flow
    • Service definition is added (200)
  • Alternative flow
    • Not logged in (401)
    • Logged in as non-admin user (401)
    • Service name exists (409) for POST, 200 for PUT

Services

List services

  • Preconditions:
    • User is logged in
  • Primary flow
    • A list of services is returned (200)
  • Alternative flow:
    • Not logged in (401)
    • No services exist (404)

Get service details:

  • Preconditions
    • User it logged in
  • Primary flow
    • Details of the current service are returned
  • Alternative flow:
    • Not logged in (401)
    • Service does not exist (404)

 

Stacks

List stacks

  • Preconditions:
    • Logged in
    • Stack has been added
  • Primary flow
    • List details of existing stacks (service, stack services, endpoints, status etc)
  • Alternate flow:
    • Not logged in (401)
    • No stacks (empty list)

Add stack

  • Preconditions
    • Logged in
    • Service exists
  • Primary flow
    • Stack is added (200)
  • Alternate flow
    • Not logged in (401)
    • Service doesn't exist (404)
    • Duplicate stack name (409)


Delete stack

  • Preconditions:
    • Logged in
    • Stack exists
    • Stack not running
  • Primary flow
    • Stack is deleted (201)
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)
    • Stack is running (409)
    • Attached volumes are orphaned

 

Start stack

  • Preconditions
    • Logged in
    • Stack exists and started
  • Primary flow:
    • All stack services (service, replication controller, pods) are stopped  (200)
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)
    • Stack not started or stopping (409)

Stop stack

  • Preconditions
    • Stack started
  • Primary flow
    • Stack service, replication controller, pods are stopped (200)
  • Alternative flow
    • Not logged in (401)
    • Stack does not exist (404)
    • Stack not started (200)

Get stack details

  • Preconditions:
    • Logged in
    • Stack exists
  • Primary flow
    • Stack details are displayed (200)
  • Alternate flow
    • Not logged in (401)
    • Stack doesn't exist (404)

Add optional service (requires restart?)

  • Preconditions:
    • Logged in
    • Service exists
    • Optional service exists
    • Stack is not started
  • Primary flow
    • Stack is added with optionals service enabled (200)
  • Alternative flow:
    • Not logged in (401)
    • Service doesn't exist (404)
    • Optional service doesn't exist (404)
    • Existing stack started (409)

 

Delete optional services 

  • Preconditions:
    • Logged in
    • Service exists
    • Optional service exists
    • Stack is not started
  • Primary flow
    • Optional service is removed from stack (200)
  • Alternative flow:
    • Not logged in (401)
    • Service doesn't exist (404)
    • Optional service doesn't exist (404)
    • Existing stack started (409)

Stack config (environment variables)

  • Preconditions:
    • Logged in
    • Stack exists
    • Stack is not started
    • Config/environment variable is valid
  • Primary flow
    • Config value is set (200)
  • Alternative flow
    • Not logged in (401)
    • Environment variable does not exist (404)
    • Stack is started (409)
       

Volumes

List volumes

  • Preconditions
    • Logged in
    • Volumes exist
  • Primary flow
    • Volume details are displayed (200)
  • Alterate flow
    • Not logged in (401)
    • No volumes exist (200)

Create volume

  • Preconditions
    • Logged in
    • Sufficient quota remaining
  • Primary flow
    • Volume is created (200)
  • Alternate flow
    • Not logged in (401)
    • Insufficient quota (409)
    • Duplicate name (409)
    • Stack service specified (200)
      • Stack doesn't exist (404)

 

Attach volume

  • Preconditions:
    • Logged in 
    • Volume exits
    • Service exists with no existing attachments
    • Service not running
  • Primary flow
    • Volume is attached to service (200)
  • Alternate flow
    • Not logged in (401)
    • Volume doesn't exist (404)
    • Service doesn't exist (404)
    • Service is running (409)

 

Delete volume

  • Preconditions
    • Logged in
    • Volume exists
    • Stack not running
  • Primary flow
    • Volume is deleted (200)
  • Alternative flo
    • Not logged in (401)
    • Volume doesn't exist (404)
    • Stack is running (409)

Detach volume

  • Preconditions
    • Logged in
    • Volume exists
    • Stack not running
  • Primary flow
    • Volume is detached (200)
  • Alternative flow
    • Not logged in (401)
    • Volume doesn't exist (404)
    • Stack is running (409)

Cluster Admin CLI Requirements

Login

  • Preconditions:
    • Not logged in
  • Primary flow
    • Valid username and password: login succeeds (200)
  • Alternate flows
    • If already logged in, secondary login still succeeds (200)
    • Invalid username/password: login fails (401)

Logout

  • Preconditions
    • Logged in as admin user
  • Primary flow:
    • User is logged out

List services

  • Preconditions:
    • Logged in as admin user
  • Primary flow
    • A list of services in the admin namespace is returned (200)
  • Alternative flow:
    • Not logged in (401)
    • No services exist (404)

Get service details:

  • Preconditions
    • Logged in as admin user
  • Primary flow
    • Details of the current service are returned
  • Alternative flow:
    • Not logged in (401)
    • Service does not exist (404)
List projects
  • Preconditions
    • Logged in as admin user
  • Primary flow:
    • List of projects is returned
  • Alternative flow
    • Not logged in (401)
    • No projects (empty list)
Add project
  • Preconditions
    • Logged in as admin user
  • Primary flow:
    • Project is added (200)
  • Alternate flow:
    • Project name exists (409)
    • Not admin user (401)
    • Not logged in (401)
    • Invalid service format
Add/Update service
  • Preconditions
    • Logged in as admin user
  • Primary flow
    • Service is added (200)
  • Alternate flow
    • Not logged in (401)
    • Not admin user (401)
    • Service is in use by projects (409)
    • Invalid service format

Delete service
  • Preconditions
    • Logged in as admin user
    • Service is not used by any projects 
  • Primary flow
    • Service is deleted (200)
  • Alternate flow
    • Not logged in (401)
    • Not admin user (401)
    • Service is in use by projects (409)
    • Service required by other services (409)
    • No such service (404)

 

 

  • No labels