#NEWLINE# def list_clusters( self ) : #NEWLINE# #INDENT# '\n        Get a list of namespaces that pods can be deployed into\n\n        :param  location: The location to search in\n        :type   location: :class:`libcloud.container.base.ClusterLocation`\n\n        :rtype: ``list`` of :class:`libcloud.container.base.ContainerCluster`\n        ' #NEWLINE# try : #NEWLINE# #INDENT# result = self . connection . request ( ( ROOT_URL + 'v1/namespaces/' ) ) . object #NEWLINE# #UNINDENT# except Exception as exc : #NEWLINE# #INDENT# errno = getattr ( exc , 'errno' , None ) #NEWLINE# if ( errno == 111 ) : #NEWLINE# #INDENT# raise KubernetesException ( result , 'Make sure kube host is accessibleand the API port is correct' ) #NEWLINE# #UNINDENT# raise #NEWLINE# #UNINDENT# clusters = [ self . _to_cluster ( value ) for value in result [ 'items' ] ] #NEWLINE# return clusters