yunify / qingcloud-sdk-go

The official QingCloud SDK for the Go programming language.
Apache License 2.0
29 stars 42 forks source link

Support NeonSAN volume #107

Closed wnxn closed 5 years ago

wnxn commented 6 years ago

Since NeonSAN volume can be created in QingCloud console, we would better support NeonSAN volume in QingCloud SDK Go.

huyujie commented 6 years ago

@wnxn It's already in the plan, I will notify you after completion.

jerryjedi commented 5 years ago

@huyujie how about the current status ? Can SDK go support neonsan volume?

huyujie commented 5 years ago

hi @wnxn @jerryjedi #113 has support neonsan volume, we can use just like this:

package main

import (
    "fmt"

    "github.com/yunify/qingcloud-sdk-go/config"
    qc "github.com/yunify/qingcloud-sdk-go/service"
)

func main() {
    conf, _ := config.New("test", "test")

    qcService, _ := qc.Init(conf)

    testVolume, _ := qcService.Volume("test")
    // iOutput, _ := testVolume.DescribeVolumes(
    //  &qc.DescribeVolumesInput{
    //      VolumeType: qc.Int(5),
    //      Volumes:    qc.StringSlice([]string{"vos-nirm3gac"}),
    //  },
    // )
    iOutput, _ := testVolume.DeleteVolumes(
        &qc.DeleteVolumesInput{
            Volumes: qc.StringSlice([]string{"vos-xxxxxxxx"}),
        },
    )

    //Print the return code.
    fmt.Println(qc.IntValue(iOutput.RetCode))

    //Print the first instance ID.
    // fmt.Println(qc.StringValue(iOutput.VolumeSet[0].VolumeName))
}
wnxn commented 5 years ago

@huyujie Thanks, cool!