Skip to content

Commit 9664593

Browse files
authored
Merge pull request #48 from lixiaojun629/develop
0.1.30
2 parents 82051a9 + b9e2b89 commit 9664593

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export VERSION=0.1.29
1+
export VERSION=0.1.30
22

33
.PHONY : install
44
install:

base/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const DefaultBaseURL = "https://api.ucloud.cn/"
3636
const DefaultProfile = "default"
3737

3838
//Version 版本号
39-
const Version = "0.1.29"
39+
const Version = "0.1.30"
4040

4141
//ConfigIns 配置实例, 程序加载时生成
4242
var ConfigIns = &AggConfig{

cmd/uhost.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ func NewCmdUHostCreate() *cobra.Command {
303303
req.SubnetId = sdk.String(base.PickResourceID(*req.SubnetId))
304304
req.SecurityGroupId = sdk.String(base.PickResourceID(*req.SecurityGroupId))
305305
req.IsolationGroup = sdk.String(base.PickResourceID(*req.IsolationGroup))
306+
if *req.Disks[1].Type == "NONE" || *req.Disks[1].Type == "" {
307+
req.Disks = req.Disks[:1]
308+
}
306309
if hotPlug == "true" {
307310
req.HotplugFeature = sdk.Bool(true)
308311
any, err := describeImageByID(*req.ImageId, *req.ProjectId, *req.Region, *req.Zone)
@@ -400,16 +403,16 @@ func NewCmdUHostCreate() *cobra.Command {
400403
bindRegion(req, flags)
401404
bindZone(req, flags)
402405

403-
req.MachineType = flags.String("machine-type", "", "Optional. Accept values: N, C, G, O. Forward to https://docs.ucloud.cn/api/uhost-api/uhost_type for details")
406+
req.MachineType = flags.String("machine-type", "N", "Optional. Accept values: N, C, G, O. Forward to https://docs.ucloud.cn/api/uhost-api/uhost_type for details")
404407
req.MinimalCpuPlatform = flags.String("minimal-cpu-platform", "", "Optional. Accpet values: Intel/Auto, Intel/IvyBridge, Intel/Haswell, Intel/Broadwell, Intel/Skylake, Intel/Cascadelake")
405408
req.UHostType = flags.String("type", "", "Optional. Accept values: N1, N2, N3, G1, G2, G3, I1, I2, C1. Forward to https://docs.ucloud.cn/api/uhost-api/uhost_type for details")
406409
req.GPU = flags.Int("gpu", 0, "Optional. The count of GPU cores.")
407-
req.NetCapability = flags.String("net-capability", "Normal", "Optional. Default is 'Normal', also support 'Super' which will enhance multiple times network capability as before")
410+
req.NetCapability = flags.String("net-capability", "Normal", "Optional. Accept values: Normal, Super and Ultra. 'Normal' will disable network enhancement. 'Super' will enable network enhancement 1.0. 'Ultra' will enable network enhancement 2.0")
408411
flags.StringVar(&hotPlug, "hot-plug", "true", "Optional. Enable hot plug feature or not. Accept values: true or false")
409412
req.Disks[0].Type = flags.String("os-disk-type", "CLOUD_SSD", "Optional. Enumeration value. 'LOCAL_NORMAL', Ordinary local disk; 'CLOUD_NORMAL', Ordinary cloud disk; 'LOCAL_SSD',local ssd disk; 'CLOUD_SSD',cloud ssd disk; 'EXCLUSIVE_LOCAL_DISK',big data. The disk only supports a limited combination.")
410413
req.Disks[0].Size = flags.Int("os-disk-size-gb", 20, "Optional. Default 20G. Windows should be bigger than 40G Unit GB")
411414
req.Disks[0].BackupType = flags.String("os-disk-backup-type", "NONE", "Optional. Enumeration value, 'NONE' or 'DATAARK'. DataArk supports real-time backup, which can restore the disk back to any moment within the last 12 hours. (Normal Local Disk and Normal Cloud Disk Only)")
412-
req.Disks[1].Type = flags.String("data-disk-type", "CLOUD_SSD", "Optional. Enumeration value. 'LOCAL_NORMAL', Ordinary local disk; 'CLOUD_NORMAL', Ordinary cloud disk; 'LOCAL_SSD',local ssd disk; 'CLOUD_SSD',cloud ssd disk; 'EXCLUSIVE_LOCAL_DISK',big data. The disk only supports a limited combination.")
415+
req.Disks[1].Type = flags.String("data-disk-type", "CLOUD_SSD", "Optional. Accept values: 'LOCAL_NORMAL','LOCAL_SSD','CLOUD_NORMAL',CLOUD_SSD','CLOUD_RSSD','EXCLUSIVE_LOCAL_DISK' and 'NONE'. 'LOCAL_NORMAL', Ordinary local disk; 'CLOUD_NORMAL', Ordinary cloud disk; 'LOCAL_SSD',local ssd disk; 'CLOUD_SSD',cloud ssd disk; 'CLOUD_RSSD', coud rssd disk; 'EXCLUSIVE_LOCAL_DISK',big data. The disk only supports a limited combination. 'NONE', create uhost without data disk. More details https://docs.ucloud.cn/api/uhost-api/disk_type")
413416
req.Disks[1].Size = flags.Int("data-disk-size-gb", 20, "Optional. Disk size. Unit GB")
414417
req.Disks[1].BackupType = flags.String("data-disk-backup-type", "NONE", "Optional. Enumeration value, 'NONE' or 'DATAARK'. DataArk supports real-time backup, which can restore the disk back to any moment within the last 12 hours. (Normal Local Disk and Normal Cloud Disk Only)")
415418
req.SecurityGroupId = flags.String("firewall-id", "", "Optional. Firewall Id, default: Web recommended firewall. see 'ucloud firewall list'.")
@@ -423,10 +426,10 @@ func NewCmdUHostCreate() *cobra.Command {
423426
flags.SetFlagValues("type", "N2", "N1", "N3", "I2", "I1", "C1", "G1", "G2", "G3")
424427
flags.SetFlagValues("machine-type", "N", "C", "G", "O")
425428
flags.SetFlagValues("minimal-cpu-platform", "Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake")
426-
flags.SetFlagValues("net-capability", "Normal", "Super")
429+
flags.SetFlagValues("net-capability", "Normal", "Super", "Ultra")
427430
flags.SetFlagValues("os-disk-type", "LOCAL_NORMAL", "CLOUD_NORMAL", "LOCAL_SSD", "CLOUD_SSD", "CLOUD_RSSD", "EXCLUSIVE_LOCAL_DISK")
428431
flags.SetFlagValues("os-disk-backup-type", "NONE", "DATAARK")
429-
flags.SetFlagValues("data-disk-type", "LOCAL_NORMAL", "CLOUD_NORMAL", "LOCAL_SSD", "CLOUD_SSD", "EXCLUSIVE_LOCAL_DISK")
432+
flags.SetFlagValues("data-disk-type", "LOCAL_NORMAL", "CLOUD_NORMAL", "LOCAL_SSD", "CLOUD_SSD", "CLOUD_RSSD", "EXCLUSIVE_LOCAL_DISK", "NONE")
430433
flags.SetFlagValues("data-disk-backup-type", "NONE", "DATAARK")
431434
flags.SetFlagValues("create-eip-line", "BGP", "International")
432435
flags.SetFlagValues("create-eip-traffic-mode", "Bandwidth", "Traffic", "ShareBandwidth")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ require (
1414
)
1515

1616
replace (
17-
github.com/spf13/cobra v0.0.3 => github.com/lixiaojun629/cobra v0.0.9
17+
github.com/spf13/cobra v0.0.3 => github.com/lixiaojun629/cobra v0.0.10
1818
github.com/spf13/pflag v1.0.3 => github.com/lixiaojun629/pflag v1.0.5
1919
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
2323
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
2424
github.com/lixiaojun629/cobra v0.0.9 h1:wk3qMaSJ/wpQMfGiaj+m6tV+Qp5gxtIIlabF3wG7WHo=
2525
github.com/lixiaojun629/cobra v0.0.9/go.mod h1:6VKYqzoixuRlMBmzm3rHPS0sRYVhT3zXEfrt+Qf8eMs=
26+
github.com/lixiaojun629/cobra v0.0.10 h1:t/BZXAogMO3W4Y2OxcE/W8SOhfVcbSL0LwINfoYVFCI=
27+
github.com/lixiaojun629/cobra v0.0.10/go.mod h1:6VKYqzoixuRlMBmzm3rHPS0sRYVhT3zXEfrt+Qf8eMs=
2628
github.com/lixiaojun629/pflag v1.0.5 h1:plFJ2SBJd2S2Fc7ZwwFZ3682IvxBiUkhRuJS40OvEMs=
2729
github.com/lixiaojun629/pflag v1.0.5/go.mod h1:uchrjsiFxJj1XOBpO4YJCZwpqXHsCHovxY91tyFoUrg=
2830
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=

vendor/github.com/spf13/cobra/doc/douku_docs.go

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ github.com/russross/blackfriday
1212
github.com/satori/go.uuid
1313
# github.com/sirupsen/logrus v1.3.0
1414
github.com/sirupsen/logrus
15-
# github.com/spf13/cobra v0.0.3 => github.com/lixiaojun629/cobra v0.0.9
15+
# github.com/spf13/cobra v0.0.3 => github.com/lixiaojun629/cobra v0.0.10
1616
github.com/spf13/cobra
1717
github.com/spf13/cobra/doc
1818
# github.com/spf13/pflag v1.0.3 => github.com/lixiaojun629/pflag v1.0.5

0 commit comments

Comments
 (0)