github.com/gophercloud/gophercloud@v1.11.0/openstack/clustering/v1/actions/doc.go (about)

     1  /*
     2  Package actions provides listing and retrieving of senlin actions for the
     3  OpenStack Clustering Service.
     4  
     5  Example to List Actions
     6  
     7  	opts := actions.ListOpts{
     8  		Limit: 5,
     9  	}
    10  
    11  	err = actions.List(serviceClient, opts).EachPage(func(page pagination.Page) (bool, error) {
    12  		actionInfos, err := actions.ExtractActions(page)
    13  		if err != nil {
    14  			return false, err
    15  		}
    16  
    17  		for _, actionInfo := range actionInfos {
    18  			fmt.Printf("%+v\n", actionInfo)
    19  		}
    20  		return true, nil
    21  	})
    22  
    23  Example to Get an Action
    24  
    25  	actionID := "edce3528-864f-41fb-8759-f4707925cc09"
    26  	action, err := actions.Get(serviceClient, actionID).Extract()
    27  	if err != nil {
    28  		panic(err)
    29  	}
    30  
    31  	fmt.Printf("Action %+v: ", action)
    32  */
    33  package actions