Skip to content

Commit a3815c2

Browse files
authored
Change version references to 6.2.0 (#89)
* Fix cmk version * Validate user access to config file IF it exists
1 parent 6ccbe1a commit a3815c2

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Apache CloudStack CloudMonkey Changelog
22
---------------------------------------
33

4+
Version 6.2.0
5+
=============
6+
This release includes:
7+
- Validation of arguments while setting cloudmonkey configuration
8+
- Verify user access to cloudmonkey configuration file
9+
- Allow sync command to be used as a verb for cloudstack API calls
10+
- Print response with newlines if output format chosen is "text"
11+
412
Version 6.1.0
513
=============
614
This release includes

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MAINTAINER "Apache CloudStack" <dev@cloudstack.apache.org>
2121
LABEL Description="Apache CloudStack CloudMonkey; Go based CloudStack command line interface"
2222
LABEL Vendor="Apache.org"
2323
LABEL License=ApacheV2
24-
LABEL Version=6.1.0
24+
LABEL Version=6.2.0
2525

2626
WORKDIR /work/
2727
RUN apt -y update && apt -y install git golang-go build-essential && \

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ Go-port of the original tool with some backward incompatibilities and reduced
7171
feature set. It ships as a standalone 64-bit executable binary for several
7272
platforms such as Linux, Mac and Windows.
7373

74+
**NOTE:**
75+
76+
If cloudmonkey is being upgraded from a version lower than v6.0.0, it must be noted
77+
that the cloudmonkey configuration path is changed from `~/.cloudmonkey/config` to
78+
`~/.cmk/config` and a default `localcloud` profile is created. One would have to hence
79+
do an initial setup of basic configration such apikey/secretkey/username/password/url for the required profile(s) as required
80+
7481
### License
7582

7683
Licensed to the Apache Software Foundation (ASF) under one

config/about.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (c *Config) Name() string {
2626

2727
// Version CLI
2828
func (c *Config) Version() string {
29-
return "6.1.0"
29+
return "6.2.0"
3030
}
3131

3232
// PrintHeader prints startup message in CLI mode

config/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,18 @@ func hasAccess(path string) bool {
108108
}
109109

110110
func checkAndCreateDir(path string) string {
111-
isAccsessible := hasAccess(path)
112-
if !isAccsessible {
113-
fmt.Println("User isn't authorized to access the config file")
114-
os.Exit(1)
115-
}
116111
if fileInfo, err := os.Stat(path); os.IsNotExist(err) || !fileInfo.IsDir() {
117112
err := os.Mkdir(path, 0700)
118113
if err != nil {
119114
fmt.Println(err)
120115
os.Exit(1)
121116
}
122117
}
118+
isAccsessible := hasAccess(path)
119+
if !isAccsessible {
120+
fmt.Println("User isn't authorized to access the config file")
121+
os.Exit(1)
122+
}
123123
return path
124124
}
125125

0 commit comments

Comments
 (0)