def testDelete(self): response = self.msgs.Empty() self.client.projects_instances_clusters.Delete.Expect( request=self.msgs.BigtableadminProjectsInstancesClustersDeleteRequest( name=self.cluster_ref.RelativeName()), response=response) self.assertEqual(clusters.Delete(self.cluster_ref), None)
def Run(self, args): """This is what gets called when the user runs this command. Args: args: an argparse namespace. All the arguments that were provided to this command invocation. Returns: Some value that we want to have printed later. """ cluster_ref = args.CONCEPTS.cluster.Parse() console_io.PromptContinue( 'You are about to delete cluster: [{0}]'.format( cluster_ref.Name()), throw_if_unattended=True, cancel_on_no=True) response = clusters.Delete(cluster_ref) log.DeletedResource(cluster_ref.Name(), 'cluster') return response