sregistry/main/google_build/delete.py
def destroy(self, name):
    '''destroy an instance, meaning take down the instance and stop the build.

       Parameters
       ==========
       name: the name of the instance to stop building.
    '''

    instances = self._get_instances()
    project = self._get_project()
    zone = self._get_zone()
    found = False

    if 'items' in instances:
        for instance in instances['items']:
            if instance['name'] == name:
                found = True
                break

    if found:        
        bot.info('Killing instance %s' %name)
        return self._compute_service.instances().delete(project=project, 
                                                        zone=zone, 
                                                        instance=name).execute()
def destroy(self, name):
    '''destroy an instance, meaning take down the instance and stop the build.

       Parameters
       ==========
       name: the name of the instance to stop building.
    '''

    instances = self._get_instances()
    project = self._get_project()
    zone = self._get_zone()
    found = False

    if 'items' in instances:
        for instance in instances['items']:
            if instance['name'] == name:
                found = True
                break

    if found:        
        bot.info('Killing instance %s' %name)
        return self._compute_service.instances().delete(project=project, 
                                                        zone=zone, 
                                                        instance=name).execute()
def destroy ( self , name ) : instances = self . _get_instances ( ) project = self . _get_project ( ) zone = self . _get_zone ( ) found = False if 'items' in instances : for instance in instances [ 'items' ] : if instance [ 'name' ] == name : found = True break if found : bot . info ( 'Killing instance %s' % name ) return self . _compute_service . instances ( ) . delete ( project = project , zone = zone , instance = name ) . execute ( )
destroy an instance, meaning take down the instance and stop the build.

       Parameters
       ==========
       name: the name of the instance to stop building.
destroy an instance meaning take down the instance and stop the build .