import_service_version(self, repository_json, mode='production', service_version='default', service_id=None, **kwargs)

        Imports a service version into Opereto from a remote repository (GIT, SVN, AWS S3, any HTTPS repository)

        :Parameters:
        * *repository_json* (`object`) -- repository_json
        :Example of repository JSON:
            .. code-block:: json

                #GIT source control
                {
                    "repo_type": "git",
                    "url": "git@bitbucket.org:my_account_name/my_project.git",
                    "branch": "master",
                    "ot_dir": "mydir"
                }

                #SVN
                {
                    "repo_type": "svn",
                    "url": "svn://myhost/myrepo",
                    "username": "OPTIONAL_USERNAME",
                    "password": "OPTIONAL_PASSWORD",
                    "ot_dir": "my_service_dir"
                }

                # Any HTTP based remote storage

                {
                    "repo_type": "http",
                    "url": "https://www.dropbox.com/s/1234567890/MyFile.zip?dl=0",
                    "username": "OPTIONAL_PASSWORD",
                    "ot_dir": "my_service_dir"
                }

                # AWS S3 Storage

                {
                    "repo_type": "s3",
                    "bucket": "my_bucket/my_service.zip",
                    "access_key": "MY_ACCESS_KEY",
                    "secret_key": "MY_SECRET_KEY",
                    "ot_dir": "my_service_dir"
                }

        * *mode* (`string`) -- production/development (default is production)
        * *service_version* (`string`) -- Service version
        * *service_id* (`string`) -- Service version


        :return: status - success/failure

        :Example:
        .. code-block:: python

            # for GIT
           repository_json = {
                "branch": "master",
                "ot_dir": "microservices/hello_world",
                "repo_type": "git",
                "url": "https://github.com/myCompany/my_services.git"
            }

            opereto_client.import_service_version(repository_json, mode='production', service_version='default', service_id=self.my_service2)

def import_service_version(self, repository_json, mode='production', service_version='default', service_id=None, **kwargs):
        '''
        import_service_version(self, repository_json, mode='production', service_version='default', service_id=None, **kwargs)

        Imports a service version into Opereto from a remote repository (GIT, SVN, AWS S3, any HTTPS repository)

        :Parameters:
        * *repository_json* (`object`) -- repository_json
        :Example of repository JSON:
            .. code-block:: json

                #GIT source control
                {
                    "repo_type": "git",
                    "url": "git@bitbucket.org:my_account_name/my_project.git",
                    "branch": "master",
                    "ot_dir": "mydir"
                }

                #SVN
                {
                    "repo_type": "svn",
                    "url": "svn://myhost/myrepo",
                    "username": "OPTIONAL_USERNAME",
                    "password": "OPTIONAL_PASSWORD",
                    "ot_dir": "my_service_dir"
                }

                # Any HTTP based remote storage

                {
                    "repo_type": "http",
                    "url": "https://www.dropbox.com/s/1234567890/MyFile.zip?dl=0",
                    "username": "OPTIONAL_PASSWORD",
                    "ot_dir": "my_service_dir"
                }

                # AWS S3 Storage

                {
                    "repo_type": "s3",
                    "bucket": "my_bucket/my_service.zip",
                    "access_key": "MY_ACCESS_KEY",
                    "secret_key": "MY_SECRET_KEY",
                    "ot_dir": "my_service_dir"
                }

        * *mode* (`string`) -- production/development (default is production)
        * *service_version* (`string`) -- Service version
        * *service_id* (`string`) -- Service version


        :return: status - success/failure

        :Example:
        .. code-block:: python

            # for GIT
           repository_json = {
                "branch": "master",
                "ot_dir": "microservices/hello_world",
                "repo_type": "git",
                "url": "https://github.com/myCompany/my_services.git"
            }

            opereto_client.import_service_version(repository_json, mode='production', service_version='default', service_id=self.my_service2)

        '''
        request_data = {'repository': repository_json, 'mode': mode, 'service_version': service_version, 'id': service_id}
        url_suffix = '/services'
        if kwargs:
            url_suffix=url_suffix+'?'+urlencode(kwargs)
        return self._call_rest_api('post', url_suffix, data=request_data, error='Failed to import service')