ia64/xen-unstable

changeset 13706:207ee547b193

Make session.this_host and session.this_user ROrun -- they are implicitly set
by a call to session.login_with_password, and cannot be created through a
constructor.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Sun Jan 28 17:21:37 2007 +0000 (2007-01-28)
parents 1e88f0b736b5
children 9521974ea1fa
files docs/xen-api/xenapi-datamodel.tex tools/python/xen/xend/XendAPI.py
line diff
     1.1 --- a/docs/xen-api/xenapi-datamodel.tex	Sun Jan 28 17:11:40 2007 +0000
     1.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Sun Jan 28 17:21:37 2007 +0000
     1.3 @@ -284,8 +284,8 @@ The following enumeration types are used
     1.4  Quals & Field & Type & Description \\
     1.5  \hline
     1.6  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
     1.7 -$\mathit{RO}_\mathit{ins}$ &  {\tt this\_host} & host ref & Currently connected host \\
     1.8 -$\mathit{RO}_\mathit{ins}$ &  {\tt this\_user} & user ref & Currently connected user \\
     1.9 +$\mathit{RO}_\mathit{run}$ &  {\tt this\_host} & host ref & Currently connected host \\
    1.10 +$\mathit{RO}_\mathit{run}$ &  {\tt this\_user} & user ref & Currently connected user \\
    1.11  $\mathit{RO}_\mathit{run}$ &  {\tt last\_active} & int & Timestamp for last time session was active \\
    1.12  \hline
    1.13  \end{longtable}
     2.1 --- a/tools/python/xen/xend/XendAPI.py	Sun Jan 28 17:11:40 2007 +0000
     2.2 +++ b/tools/python/xen/xend/XendAPI.py	Sun Jan 28 17:21:37 2007 +0000
     2.3 @@ -451,7 +451,6 @@ class XendAPI(object):
     2.4  
     2.5      session_attr_ro = ['this_host', 'this_user']
     2.6      session_methods = [('logout', None)]
     2.7 -    # session_funcs = ['login_with_password']    
     2.8  
     2.9      def session_login_with_password(self, *args):
    2.10          if len(args) != 2:
    2.11 @@ -473,8 +472,6 @@ class XendAPI(object):
    2.12      def session_logout(self, session):
    2.13          auth_manager().logout(session)
    2.14          return xen_api_success_void()
    2.15 -    def session_destroy(self, session):
    2.16 -        return xen_api_error(XEND_ERROR_UNSUPPORTED)
    2.17      def session_get_record(self, session):
    2.18          record = {'this_host': XendNode.instance().uuid,
    2.19                    'this_user': auth_manager().get_user(session)}