github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/rts/v1/softwareconfig/doc.go (about)

     1  /*
     2  Package softwareconfig enables management and retrieval of Software Configs
     3  
     4  Example to List Software Configs
     5  
     6  	listOpts := softwareconfig.ListOpts{}
     7  	allConfigs, err := softwareconfig.List(client,listOpts)
     8  	if err != nil {
     9  		panic(err)
    10  	}
    11  
    12  	for _, config := range allConfigs {
    13  		fmt.Printf("%+v\n", config)
    14  	}
    15  
    16  Example to Get Software Deployment
    17  
    18  	configID:="bd7d48a5-6e33-4b95-aa28-d0d3af46c635"
    19  
    20   	configs,err:=softwareconfig.Get(client,configID).Extract()
    21  
    22  	if err != nil {
    23  		panic(err)
    24  	}
    25  
    26  
    27  Example to Create a Software Configs
    28  
    29  	createOpts := softwareconfig.CreateOpts{
    30  		Name:         "config_test",
    31  	}
    32  
    33  	config, err := softwareconfig.Create(client, createOpts).Extract()
    34  	if err != nil {
    35  		panic(err)
    36  	}
    37  
    38  Example to Delete a Software Configs
    39  
    40  	configID := "8de48948-b6d6-4417-82a5-071f7811af91"
    41  	del:=softwareconfig.Delete(client,configID).ExtractErr()
    42  	if err != nil {
    43  		panic(err)
    44  	}
    45  */
    46  package softwareconfig