src/sasctl/_services/model_repository.py
def create_model_version(cls, model, minor=False):
        """Create a new version of an existing model.

        Create a new major (X.0) or minor (1.X) version of an existing
        model.  All contents from the current version are copied to the new
        version.

        Parameters
        ----------
        model : str or dict
            The name, id, or dictionary representation of a model.
        minor : bool, optional
            Whether the new version should be a minor version increment from
            the current version.  Otherwise, a new major version will be
            created.  Defaults to False.

        Returns
        -------
        RestObj
            The new version of the model.

        """
        model_obj = cls.get_model(model)
        if cls.get_model_link(model_obj, 'addModelVersion') is None:
            raise ValueError("Unable to create a new version for model '%s'"
                             % model)

        option = 'minor' if minor else 'major'

        # As of 8/9/19 addModelVersion returns the CURRENT model version,
        # not the NEW version.  Refresh the model to get the latest version.
        cls.request_link(model_obj, 'addModelVersion', json={'option': option})

        return cls.get_model(model_obj, refresh=True)
Create a new version of an existing model.

        Create a new major (X.0) or minor (1.X) version of an existing
        model.  All contents from the current version are copied to the new
        version.

        Parameters
        ----------
        model : str or dict
            The name, id, or dictionary representation of a model.
        minor : bool, optional
            Whether the new version should be a minor version increment from
            the current version.  Otherwise, a new major version will be
            created.  Defaults to False.

        Returns
        -------
        RestObj
            The new version of the model.

        
Create a new version of an existing model.
Create a new major (X.0) or minor (1.X) version of an existing
model.  All contents from the current version are copied to the new
version.

Parameters

model : str or dict
The name, id, or dictionary representation of a model.
minor : bool, optional
Whether the new version should be a minor version increment from
the current version.  Otherwise, a new major version will be
created.  Defaults to False.

Returns

RestObj
The new version of the model.
Create a new version of an existing model . Create a new major ( X . 0 ) or minor ( 1 . X ) version of an existing model . All contents from the current version are copied to the new version . Parameters model : str or dict The name id or dictionary representation of a model . minor : bool optional Whether the new version should be a minor version increment from the current version . Otherwise a new major version will be created . Defaults to False . Returns RestObj The new version of the model .
def create_model_version(cls, model, minor=False):
        model_obj = cls.get_model(model)
        if cls.get_model_link(model_obj, 'addModelVersion') is None:
            raise ValueError("Unable to create a new version for model '%s'"
                             % model)
        option = 'minor' if minor else 'major'
        cls.request_link(model_obj, 'addModelVersion', json={'option': option})
        return cls.get_model(model_obj, refresh=True)
def create_model_version ( cls , model , minor = False ) : model_obj = cls . get_model ( model ) if cls . get_model_link ( model_obj , 'addModelVersion' ) is None : raise ValueError ( "Unable to create a new version for model '%s'" % model ) option = 'minor' if minor else 'major' cls . request_link ( model_obj , 'addModelVersion' , json = { 'option' : option } ) return cls . get_model ( model_obj , refresh = True )
Create a new version of an existing model.
Create a new version of an existing model .
"""Create a new version of an existing model.

        Create a new major (X.0) or minor (1.X) version of an existing
        model.  All contents from the current version are copied to the new
        version.

        Parameters
        ----------
        model : str or dict
            The name, id, or dictionary representation of a model.
        minor : bool, optional
            Whether the new version should be a minor version increment from
            the current version.  Otherwise, a new major version will be
            created.  Defaults to False.

        Returns
        -------
        RestObj
            The new version of the model.

        """ # As of 8/9/19 addModelVersion returns the CURRENT model version, # not the NEW version.  Refresh the model to get the latest version.
cls
model
minor