@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from positional import positional
from keystoneauth1 import _utils as utils
__all__ = ( ' DiscoveryList ' ,
@ -33,7 +31,6 @@ class DiscoveryBase(dict):
: param DateTime updated : When the API was last updated .
"""
@positional ( )
def __init__ ( self , id , status = None , updated = None ) :
super ( DiscoveryBase , self ) . __init__ ( )
@ -77,7 +74,6 @@ class DiscoveryBase(dict):
def updated ( self , value ) :
self . updated_str = value . isoformat ( )
@positional ( )
def add_link ( self , href , rel = ' self ' , type = None ) :
link = { ' href ' : href , ' rel ' : rel }
if type :
@ -89,7 +85,6 @@ class DiscoveryBase(dict):
def media_types ( self ) :
return self . setdefault ( ' media-types ' , [ ] )
@positional ( 1 )
def add_media_type ( self , base , type ) :
mt = { ' base ' : base , ' type ' : type }
self . media_types . append ( mt )
@ -126,7 +121,6 @@ class MicroversionDiscovery(DiscoveryBase):
: param string max_version : The maximum supported microversion . ( optional )
"""
@positional ( )
def __init__ ( self , href , id , min_version = ' ' , max_version = ' ' , * * kwargs ) :
super ( MicroversionDiscovery , self ) . __init__ ( id , * * kwargs )
@ -165,7 +159,6 @@ class NovaMicroversionDiscovery(DiscoveryBase):
: param string version : The maximum microversion supported . ( optional )
"""
@positional ( )
def __init__ ( self , href , id , min_version = None , version = None , * * kwargs ) :
super ( NovaMicroversionDiscovery , self ) . __init__ ( id , * * kwargs )
@ -210,7 +203,6 @@ class V2Discovery(DiscoveryBase):
_DESC_URL = ' https://developer.openstack.org/api-ref/identity/v2/ '
@positional ( )
def __init__ ( self , href , id = None , html = True , pdf = True , * * kwargs ) :
super ( V2Discovery , self ) . __init__ ( id or ' v2.0 ' , * * kwargs )
@ -256,7 +248,6 @@ class V3Discovery(DiscoveryBase):
: param bool xml : Add XML media - type elements to the structure .
"""
@positional ( )
def __init__ ( self , href , id = None , json = True , xml = True , * * kwargs ) :
super ( V3Discovery , self ) . __init__ ( id or ' v3.0 ' , * * kwargs )
@ -307,7 +298,6 @@ class DiscoveryList(dict):
TEST_URL = ' http://keystone.host:5000/ '
@positional ( 2 )
def __init__ ( self , href = None , v2 = True , v3 = True , v2_id = None , v3_id = None ,
v2_status = None , v2_updated = None , v2_html = True , v2_pdf = True ,
v3_status = None , v3_updated = None , v3_json = True , v3_xml = True ) :