def __init__(self, endpoint=None, **kwargs): """Initialize a new client for the Images v1 API.""" endpoint, self.version = utils.endpoint_version_from_url(endpoint, 1.0) self.http_client = http.get_http_client(endpoint=endpoint, **kwargs) self.images = images.ImageManager(self.http_client) self.image_members = image_members.ImageMemberManager(self.http_client) self.versions = versions.VersionManager(self.http_client)
def __init__(self, endpoint=None, **kwargs): endpoint, self.version = utils.endpoint_version_from_url(endpoint, 2.0) self.http_client = http.get_http_client(endpoint=endpoint, **kwargs) self.schemas = schemas.Controller(self.http_client) self.images = images.Controller(self.http_client, self.schemas) self.image_tags = image_tags.Controller(self.http_client, self.schemas) self.image_members = image_members.Controller(self.http_client, self.schemas) self.tasks = tasks.Controller(self.http_client, self.schemas) self.metadefs_resource_type = (metadefs.ResourceTypeController( self.http_client, self.schemas)) self.metadefs_property = (metadefs.PropertyController( self.http_client, self.schemas)) self.metadefs_object = (metadefs.ObjectController( self.http_client, self.schemas)) self.metadefs_tag = (metadefs.TagController(self.http_client, self.schemas)) self.metadefs_namespace = (metadefs.NamespaceController( self.http_client, self.schemas)) self.versions = versions.VersionController(self.http_client)
def __init__(self, endpoint=None, **kwargs): endpoint, self.version = utils.endpoint_version_from_url(endpoint, 2.0) self.http_client = http.get_http_client(endpoint=endpoint, **kwargs) self.schemas = schemas.Controller(self.http_client) self.images = images.Controller(self.http_client, self.schemas) self.image_tags = image_tags.Controller(self.http_client, self.schemas) self.image_members = image_members.Controller(self.http_client, self.schemas) self.tasks = tasks.Controller(self.http_client, self.schemas) self.metadefs_resource_type = ( metadefs.ResourceTypeController(self.http_client, self.schemas)) self.metadefs_property = ( metadefs.PropertyController(self.http_client, self.schemas)) self.metadefs_object = ( metadefs.ObjectController(self.http_client, self.schemas)) self.metadefs_tag = ( metadefs.TagController(self.http_client, self.schemas)) self.metadefs_namespace = ( metadefs.NamespaceController(self.http_client, self.schemas))