cl-openstack-client

API Reference

cl-openstack-client

OpenStack client libraries

CL-OPENSTACK-CLIENT

  • Function ASSOC* (item alist &rest rest &key key test test-not)
    Return the CDR of the ASSOC result.
  • Variable *HTTP-STREAM*
    nil
    This stream is primarily used for dependency injection in testcases.
  • Condition OPENSTACK-ERROR  (ERROR)
  • Function HANDLE-HTTP-ERROR (resource uri status-code headers stream)
  • Class RESOURCE
    ID   Reader: RESOURCE-ID
    CONNECTION   Reader: RESOURCE-CONNECTION
    ATTRIBUTES
  • Method RESOURCE-ERROR-CLASS ((resource resource))
  • Method DECODE-RESOURCE (resource parent type)
  • Method DECODE-RESOURCE-LIST (resources parent type)
  • Generic-Function RESOURCE-AUTHENTICATION-HEADERS (resource)
    Return a list of the authentication headers that should be added to the request.
  • Variable *RESOURCE-URI*
    nil
  • Function REQUEST-RESOURCE (resource &key method additional-headers content (uri *resource-uri*) (content-type "application/json"))
  • Generic-Function SERVICE-URL (resource &optional service-name)
  • Macro DEF-REST-METHOD (name lambda-list options &body body)
    A convenience wrapper around request-resource. NAME is the name of the method. LAMBDA-LIST is a method lambda list, it's first element will be used to source a connection, so it must be of the type RESOURCE or CONNECTION. OPTIONS is in the form of an ALIST and can contain URI or DOCUMENTATION elements. URI is the uri to the resource you are looking for it supports RFC6570? tempting and will be evaluated in the context of the method as if in a PROGN so values from the LAMBDA-LIST will be substituted in provided the symbol names match. Any RESOURCE types will have their RESOURCE-ID methods called before substitution. Only simple expansion is supported from the RFC. The resulting URI will be bound to the *RESOURCE-URI* variable for use within other helper functions. DOCUMENTATION a documentation string that will be assigned to the method. BODY is a for the method body.
  • Macro DEF-REST-GENERIC (name lambda-list &body options)
    Define a generic with REST methods.
  • Method RESOURCE-ERROR-CLASS ((resource connection))
  • Method RESOURCE-AUTHENTICATION-HEADERS ((resource connection-v2))
  • Method SERVICE-URL ((connection connection-v2) &optional (service "identity"))
  • Method RESOURCE-ERROR-CLASS ((resource resource-v2))
  • Method RESOURCE-AUTHENTICATION-HEADERS ((resource resource-v2))
  • Method SERVICE-URL ((resource resource-v2) &optional (service "identity"))
  • Method DECODE-RESOURCE ((type (eql 'cl-keystone-client::tenant-v2)) (parent connection-v2) stream)

CL-KEYSTONE-CLIENT

  • Condition KEYSTONE-ERROR  (OPENSTACK-ERROR)
  • Class CONNECTION-V2  (CONNECTION)
    VERSION   Reader: CONNECTION-VERSION
  • Generic-Function AUTHENTICATE (connection)
    Authenticate and retrieve a token.
  • Generic-Function CONNECTION-TOKEN-ID (connection)
    Retrieve token id for CONNECTION.
  • Method CONNECTION-TOKEN-ID ((connection connection-v2))
  • Generic-Function CONNECTION-TOKEN-ISSUED-AT (connection)
    Return the time the CONNECTION's token was issued at.
  • Method CONNECTION-TOKEN-ISSUED-AT ((connection connection-v2))
  • Generic-Function CONNECTION-TOKEN-EXPIRES (connection)
    Return the time when the CONNECTION's token will expire.
  • Method CONNECTION-TOKEN-EXPIRES ((connection connection-v2))
  • Generic-Function CONNECTION-TOKEN-VALID-P (connection)
    Return T if the CONNECTION's token is still valid.
  • Method CONNECTION-TOKEN-VALID-P ((connection connection-v2))
  • Method CONNECTION-TENANT ((connection connection-v2))
    Return the current connections TENANT.
  • Class TENANT  (NAMED-RESOURCE-V2)
    ID   Reader: TENANT-ID
    NAME   Reader: TENANT-NAME
    ENABLED   Reader: TENANT-ENABLED
    DESCRIPTION   Reader: TENANT-DESCRIPTION
  • Generic-Function LIST-TENANTS (resource)
  • Method LIST-TENANTS ((connection connection-v2))
    List all the tenants.
  • Method USER-ID ((user user))
  • Method USER-ID ((connection connection-v2))
  • Method USER-NAME ((connection connection-v2))
  • Generic-Function LIST-USERS (resource)
  • Method LIST-USERS ((tenant tenant-v2))
    List all the users for tenant.
  • Method LIST-USERS ((connection connection-v2))
    List all users in keystone.
  • Method GET-USER (connection user)
    Gets information for a specified user.
  • Generic-Function ADD-USER (connection &key name email enabled password)
  • Method ADD-USER ((connection connection-v2) &key name email (enabled t) password)
    Add a user.
  • Generic-Function DELETE-USER (resource user-or-user-id)
  • Method DELETE-USER ((connection connection-v2) user-or-user-id)
    Delete a user.
  • Generic-Function LIST-ROLES (resource)
  • Method LIST-ROLES ((connection connection-v2))
    List roles.
  • Method LIST-ROLES ((user user-v2))
    Lists global roles for a specified user. Excludes tenant roles.

Also exports

  • CL-OPENSTACK-CLIENT:RESOURCE-CONNECTION
  • CL-OPENSTACK-CLIENT:ERROR-MESSAGE
  • CL-OPENSTACK-CLIENT:ERROR-CODE
  • CL-OPENSTACK-CLIENT:RESOURCE-ID
  • CL-OPENSTACK-CLIENT:ID

cl-openstack-client-test

OpenStack client libraries tests

CL-KEYSTONE-CLIENT.TEST

No exported symbols.

CL-OPENSTACK-CLIENT.TEST

  • Function CONNECTION-FIXTURE (&key (url "http://localhost:5000") (username "demo") (password "demo"))
  • Class MOCK-HTTP-STREAM  (FUNDAMENTAL-BINARY-INPUT-STREAM, FUNDAMENTAL-BINARY-OUTPUT-STREAM, FUNDAMENTAL-CHARACTER-INPUT-STREAM, FUNDAMENTAL-CHARACTER-OUTPUT-STREAM)
    MOCK-REQUESTS   Accessor: MOCK-REQUEST-STREAM
    MOCK-RESPONSES-LOCATION   Accessor: MOCK-RESPONSE-LOCATION
    MOCK-RESPONSES   Accessor: MOCK-RESPONSE-STREAM
  • Function MAKE-MOCK-HTTP-STREAM (&optional (stream (make-instance 'mock-http-stream)))
  • Method READ-MOCK-REQUEST ((stream mock-http-stream))
    Read a request out of a MOCK-HTTP-STREAM. The result is a list in form (parsed-status-line headers contents)
  • Macro WITH-MOCK-HTTP-STREAM ((stream) &body body)