Change in vdsm[master]: api: remove unused methods

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Wed Feb 17 17:31:53 UTC 2016


Piotr Kliczewski has uploaded a new change for review.

Change subject: api: remove unused methods
......................................................................

api: remove unused methods

There is no reference in the engine nor in vdsClient of the methods in
ConnectionRefs category.


Change-Id: Iaa97a687aad51e319eceffd9f82bc863a28e6bb8
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M lib/api/vdsmapi-schema.json
M vdsm/API.py
M vdsm/rpc/Bridge.py
M vdsm/rpc/bindingxmlrpc.py
4 files changed, 0 insertions(+), 313 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/73/53673/1

diff --git a/lib/api/vdsmapi-schema.json b/lib/api/vdsmapi-schema.json
index 69a6802..01d959a 100644
--- a/lib/api/vdsmapi-schema.json
+++ b/lib/api/vdsmapi-schema.json
@@ -4618,291 +4618,6 @@
 ##
 {'command': {'class': 'Host', 'name': 'setSafeNetworkConfig'}}
 
-
-## Category: @ConnectionRefs ##################################################
-##
-# @ConnectionRefs:
-#
-# The ConnectionRefs namespace.
-#
-# Since: 4.10.0
-##
-{'class': 'ConnectionRefs'}
-
-##
-# @IscsiPortal:
-#
-# A host/port pair that identifies an ISCSI target.
-#
-# @host:  A fully-qualified domain name (FQDN) or IP address
-#
-# @port:  #optional A port number
-#
-# Since: 4.10.0
-##
-{'type': 'IscsiPortal', 'data': {'host': 'str', '*port': 'int'}}
-
-##
-# @IscsiCredentialsLogin:
-#
-# Login credentials for an ISCI target.
-#
-# @username:  The username used for authentication to an ISCI target
-# @password:  The password associated with the given username
-#
-# Since: 4.10.0
-##
-{'type': 'IscsiCredentialsLogin',
- 'data': {'username': 'str', 'password': 'str'}}
-
-##
-# @IscsiCredentialsType:
-#
-# An enumeration of ISCSI login credentials types.
-#
-# @chap:  Challenge-Handshake Authentication Protocol
-#
-# Since: 4.10.0
-##
-{'enum': 'IscsiCredentialsType', 'data': ['chap']}
-
-##
-# @IscsiCredentials:
-#
-# This structure stores ISCSI credentials.
-#
-# @authType:  #optional The type of authentication to be used
-#
-# @params:    Type-specific authentication credentials
-#
-# Since: 4.10.0
-# XXX: params should probably be an enum to permit future extension.
-##
-{'type': 'IscsiCredentials',
- 'data': {'*authType': 'IscsiCredentialsType',
-          'params': 'IscsiCredentialsLogin'}}
-
-##
-# @IscsiConnectionParameters:
-#
-# Parameters for initiating a new ISCSI connection.
-#
-# @portal:       An @IscsiPortal to identify the requested target
-#
-# @iqn:          The ISCSI Qualified Name
-#
-# @tpgt:         #optional The Target Portal Group Tag to use
-#
-# @iface:        #optional The ISCSI interface name
-#
-# @credentials:  #optional An @IscsiCredentials containing the required
-#                authentication information
-#
-# Since: 4.10.0
-##
-{'type': 'IscsiConnectionParameters',
- 'data': {'portal': 'IscsiPortal', 'iqn': 'str', '*tpgt': 'int',
-          '*iface': 'str', '*credentials': 'IscsiCredentials'}}
-
-##
-# @PosixFsConnectionParameters:
-#
-# Parameters for initiating a new POSIX FS connection.
-#
-# @spec:     A string identifying the location of the target filesystem
-#
-# @vfstype:  The Linux VFS filesystem type
-#
-# @options:   #optional A comma-separated list of mount options
-#
-# Since: 4.10.0
-##
-{'type': 'PosixFsConnectionParameters',
- 'data': {'spec': 'str', 'vfstype': 'str', '*options': 'str'}}
-
-##
-# @NfsConnectionParameters:
-#
-# Parameters for initiating a new NFS connection.
-#
-# @export:   The remote target in <host>:<path> format
-#
-# @retrans:  #optional The number of retry attempts for failing operations
-#
-# @timeout:  #optional The time to wait before retrying a request (specified in
-#            tenths of one second).
-#
-# @version:  #optional Set the NFS protocol version
-#
-# Since: 4.10.0
-##
-{'type': 'NfsConnectionParameters',
- 'data': {'export': 'str', '*retrans': 'int', '*timeout': 'int',
-          '*version': 'str'}}
-
-##
-# @LocalFsConnectionParameters:
-#
-# Parameters for initiating a connection to local storage.
-#
-# @path:  The local filesystem path
-#
-# Since: 4.10.0
-##
-{'type': 'LocalFsConnectionParameters', 'data': {'path': 'str'}}
-
-##
-# @ConnectionRefParameters:
-#
-# A discriminated record of parameters used to establish a ConnectionRef.
-#
-# XXX: This type lacks an identifier to indicate the union type
-#
-# Since: 4.10.0
-##
-{'type': 'ConnectionRefParameters',
- 'data': {},
- 'union': ['IscsiConnectionParameters', 'PosixFsConnectionParameters',
-           'NfsConnectionParameters', 'LocalFsConnectionParameters']}
-
-##
-# @ConnectionRefType:
-#
-# An enumeration of @ConnectionRef types.
-#
-# @iscsi:    Storage exported by a remote ISCSI target
-#
-# @posixfs:  Storage available through use of the 'mount' command
-#
-# @nfs:      Storage exported by a remote NFS server
-#
-# @localfs:  Storage available in the host's local file hierarchy
-#
-# Since: 4.10.0
-##
-{'enum': 'ConnectionRefType',
- 'data': ['iscsi', 'posixfs', 'nfs', 'localfs']}
-
-##
-# @ConnectionRefArgs:
-#
-# Structure to store @ConnectionRef arguments.
-#
-# @connType:  The type of connection (one of @ConnectionRefType)
-#
-# @params:    An @ConnectionRefParameters structure appropriate for @connType
-#
-# Since: 4.10.0
-##
-{'type': 'ConnectionRefArgs',
- 'data': {'connType': 'ConnectionRefType',
-          'params': 'ConnectionRefParameters'}}
-
-##
-# @ConnectionError:
-#
-# A tuple containing @ConnectionRef error information.
-#
-# @code:     The error code
-#
-# @message:  The error message
-#
-# Since: 4.10.0
-##
-{'type': 'ConnectionError', 'data': {'code': 'int', 'message': 'str'}}
-
-##
-# @ConnectionRef:
-#
-# Contains the details of a registered storage connection.
-#
-# @connected:       Indicates whether the storage is connected
-#
-# @lastError:       The most recent error information (@ConnectionError)
-#
-# @connectionInfo:  Type-specific connection details (@ConnectionRefParameters)
-#
-# Since: 4.10.0
-##
-{'type': 'ConnectionRef',
- 'data': {'connected': 'bool', 'lastError': 'ConnectionError',
-          'connectionInfo': 'ConnectionRefParameters'}}
-
-##
-# @ConnectionRefArgsMap:
-#
-# A mapping of connection arguments indexed by ConnectionRef UUID.
-#
-# Since: 4.10.0
-##
-{'map': 'ConnectionRefArgsMap',
- 'key': 'UUID', 'value': 'ConnectionRefArgs'}
-
-##
-# @ConnectionRefArgsStatusMap:
-#
-# A mapping of status codes indexed by ConnectionRef UUID.
-#
-# Since: 4.10.0
-##
-{'map': 'ConnectionRefArgsStatusMap',
- 'key': 'UUID', 'value': 'int'}
-
-##
-# @ConnectionRefs.acquire:
-#
-# Acquire one or more new storage connection references.
-#
-# @conRefArgs:  Connection parameters
-#
-# Returns:
-# A dictionary of status codes indexed by the same @UUID values in @conRefArgs.
-#
-# Since: 4.10.0
-##
-{'command': {'class': 'ConnectionRefs', 'name': 'acquire'},
- 'data': {'conRefArgs': 'ConnectionRefArgsMap'},
- 'returns': 'ConnectionRefArgsStatusMap'}
-
-##
-# @ConnectionRefs.release:
-#
-# Release one or more storage connection references.
-#
-# @refIDs:  A list of @UUID values
-#
-# Returns:
-# A dictionary of status codes indexed by ConnectionRef UUID
-#
-# Since: 4.10.0
-##
-{'command': {'class': 'ConnectionRefs', 'name': 'release'},
- 'data': {'refIDs': ['UUID']},
- 'returns': 'ConnectionRefArgsStatusMap'}
-
-##
-# @ConnectionRefMap:
-#
-# A mapping of ConnectionRef information indexed by UUID.
-#
-# Since: 4.10.0
-##
-{'map': 'ConnectionRefMap',
- 'key': 'UUID', 'value': 'ConnectionRef'}
-
-##
-# @ConnectionRefs.statuses:
-#
-# Get information about all registered storage connection references.
-#
-# Returns:
-# A dictionary of @ConnectionRef objects indexed by @UUID
-#
-# Since: 4.10.0
-##
-{'command': {'class': 'ConnectionRefs', 'name': 'statuses'},
- 'returns': 'ConnectionRefMap'}
-
 ## Category: @ISCSIConnection #################################################
 ##
 # @ISCSIConnection:
diff --git a/vdsm/API.py b/vdsm/API.py
index 479c00b..ed21969 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -95,22 +95,6 @@
         self.log = self._cif.log
 
 
-class ConnectionRefs(APIBase):
-    ctorArgs = []
-
-    def __init__(self):
-        APIBase.__init__(self)
-
-    def acquire(self, conRefArgs):
-        return self._irs.storageServer_ConnectionRefs_acquire(conRefArgs)
-
-    def release(self, refIDs):
-        return self._irs.storageServer_ConnectionRefs_release(refIDs)
-
-    def statuses(self):
-        return self._irs.storageServer_ConnectionRefs_statuses()
-
-
 class Task(APIBase):
     ctorArgs = ['taskID']
 
diff --git a/vdsm/rpc/Bridge.py b/vdsm/rpc/Bridge.py
index b967ee4..e1dba75 100644
--- a/vdsm/rpc/Bridge.py
+++ b/vdsm/rpc/Bridge.py
@@ -410,9 +410,6 @@
 # - Specify a custom function to post-process the result into a return value
 ##
 command_info = {
-    'ConnectionRefs_acquire': {'ret': 'results'},
-    'ConnectionRefs_release': {'ret': 'results'},
-    'ConnectionRefs_statuses': {'ret': 'connectionslist'},
     'Host_fenceNode': {'ret': Host_fenceNode_Ret},
     'Host_getAllTasksInfo': {'ret': 'allTasksInfo'},
     'Host_getAllTasksStatuses': {'ret': 'allTasksStatus'},
diff --git a/vdsm/rpc/bindingxmlrpc.py b/vdsm/rpc/bindingxmlrpc.py
index 17ce1ac..4f346ac 100644
--- a/vdsm/rpc/bindingxmlrpc.py
+++ b/vdsm/rpc/bindingxmlrpc.py
@@ -1023,15 +1023,6 @@
         api = API.Global()
         return api.getDevicesVisibility(guids)
 
-    def storageServerConnectionRefsAcquire(self, conRefArgs):
-        return API.ConnectionRefs().acquire(conRefArgs)
-
-    def storageServerConnectionRefsRelease(self, refIDs):
-        return API.ConnectionRefs().release(refIDs)
-
-    def storageServerConnectionRefsStatuses(self):
-        return API.ConnectionRefs().statuses()
-
     def sdm_create_volume(self, job_id, vol_info):
         sdm = API.SDM()
 


-- 
To view, visit https://gerrit.ovirt.org/53673
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa97a687aad51e319eceffd9f82bc863a28e6bb8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>


More information about the vdsm-patches mailing list