Browse code

Merge pull request #710 from moutten/patch-1

Add the --format tag to knife list commands

Robby Russell authored on 26/12/2011 at 18:30:09
Showing 1 changed files
... ...
@@ -141,27 +141,27 @@ _knife_options3() {
141 141
 
142 142
 # The chef_x_remote functions use knife to get a list of objects of type x on the server
143 143
 _chef_roles_remote() {
144
- (knife role list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
144
+ (knife role list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
145 145
 }
146 146
 
147 147
 _chef_clients_remote() {
148
- (knife client list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
148
+ (knife client list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
149 149
 }
150 150
 
151 151
 _chef_nodes_remote() {
152
- (knife node list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
152
+ (knife node list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
153 153
 }
154 154
 
155 155
 _chef_cookbooks_remote() {
156
- (knife cookbook list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
156
+ (knife cookbook list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
157 157
 }
158 158
 
159 159
 _chef_sitecookbooks_remote() {
160
- (knife cookbook site list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
160
+ (knife cookbook site list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
161 161
 }
162 162
 
163 163
 _chef_data_bags_remote() {
164
- (knife data bag list | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
164
+ (knife data bag list --format json | grep \" | awk '{print $1}' | awk -F"," '{print $1}' | awk -F"\"" '{print $2}')
165 165
 }
166 166
 
167 167
 _chef_environments_remote() {