Merge "deprecate command cinder endpoints"
				
					
				
			This commit is contained in:
		@@ -23,6 +23,7 @@ import copy
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
import time
 | 
			
		||||
import warnings
 | 
			
		||||
 | 
			
		||||
from cinderclient import exceptions
 | 
			
		||||
from cinderclient import utils
 | 
			
		||||
@@ -654,6 +655,10 @@ def do_type_key(cs, args):
 | 
			
		||||
 | 
			
		||||
def do_endpoints(cs, args):
 | 
			
		||||
    """Discovers endpoints registered by authentication service."""
 | 
			
		||||
    warnings.warn(
 | 
			
		||||
        "``cinder endpoints`` is deprecated, use ``openstack catalog list`` "
 | 
			
		||||
        "instead. The ``cinder endpoints`` command may be removed in the P "
 | 
			
		||||
        "release or next major release of cinderclient (v2.0.0 or greater).")
 | 
			
		||||
    catalog = cs.client.service_catalog.catalog
 | 
			
		||||
    for e in catalog:
 | 
			
		||||
        utils.print_dict(e['endpoints'][0], e['name'])
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ import copy
 | 
			
		||||
import os
 | 
			
		||||
import sys
 | 
			
		||||
import time
 | 
			
		||||
import warnings
 | 
			
		||||
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
@@ -1034,6 +1035,10 @@ def do_type_access_remove(cs, args):
 | 
			
		||||
@utils.service_type('volumev3')
 | 
			
		||||
def do_endpoints(cs, args):
 | 
			
		||||
    """Discovers endpoints registered by authentication service."""
 | 
			
		||||
    warnings.warn(
 | 
			
		||||
        "``cinder endpoints`` is deprecated, use ``openstack catalog list`` "
 | 
			
		||||
        "instead. The ``cinder endpoints`` command may be removed in the P "
 | 
			
		||||
        "release or next major release of cinderclient (v2.0.0 or greater).")
 | 
			
		||||
    catalog = cs.client.service_catalog.catalog
 | 
			
		||||
    for e in catalog:
 | 
			
		||||
        utils.print_dict(e['endpoints'][0], e['name'])
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								releasenotes/notes/bug-1608166-ad91a7a9f50e658a.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								releasenotes/notes/bug-1608166-ad91a7a9f50e658a.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
---
 | 
			
		||||
deprecations:
 | 
			
		||||
  - |
 | 
			
		||||
    The ``cinder endpoints`` command has been deprecated. This
 | 
			
		||||
    command performs an identity operation, and should now be
 | 
			
		||||
    handled by ``openstack catalog list``.
 | 
			
		||||
    [Bug `1608166 <https://bugs.launchpad.net/bugs/1608166>`_]
 | 
			
		||||
		Reference in New Issue
	
	Block a user