def create(cls, paas_info, vhost, alter_zone, background):
        """ Create a new vhost. """
        if not background and not cls.intty():
            background = True

        params = {'paas_id': paas_info['id'],
                  'vhost': vhost,
                  'zone_alter': alter_zone}
        result = cls.call('paas.vhost.create', params, dry_run=True)

        if background:
            return result

        cls.echo('Creating a new vhost.')
        cls.display_progress(result)
        cls.echo('Your vhost %s has been created.' % vhost)

        return result
def create ( cls , paas_info , vhost , alter_zone , background ) : if not background and not cls . intty ( ) : background = True params = { 'paas_id' : paas_info [ 'id' ] , 'vhost' : vhost , 'zone_alter' : alter_zone } result = cls . call ( 'paas.vhost.create' , params , dry_run = True ) if background : return result cls . echo ( 'Creating a new vhost.' ) cls . display_progress ( result ) cls . echo ( 'Your vhost %s has been created.' % vhost ) return result
Create a new vhost.