11#!/usr/bin/env ruby
22
33# -------------------------------------------------------------------------- #
4- # Copyright 2002-2025 , OpenNebula Project, OpenNebula Systems #
4+ # Copyright 2002-2022 , OpenNebula Project, OpenNebula Systems #
55# #
66# Licensed under the Apache License, Version 2.0 (the "License"); you may #
77# not use this file except in compliance with the License. You may obtain #
2929module CloudClient
3030
3131 # OpenNebula version
32- VERSION = '6.10.0 '
32+ VERSION = '6.6.1 '
3333
3434 # #########################################################################
3535 # Default location for the authentication file
@@ -359,8 +359,7 @@ module Service
359359 'DEPLOYING_NETS' => 11 ,
360360 'UNDEPLOYING_NETS' => 12 ,
361361 'FAILED_DEPLOYING_NETS' => 13 ,
362- 'FAILED_UNDEPLOYING_NETS' => 14 ,
363- 'HOLD' => 15
362+ 'FAILED_UNDEPLOYING_NETS' => 14
364363 }
365364
366365 STATE_STR = [
@@ -378,8 +377,7 @@ module Service
378377 'DEPLOYING_NETS' ,
379378 'UNDEPLOYING_NETS' ,
380379 'FAILED_DEPLOYING_NETS' ,
381- 'FAILED_UNDEPLOYING_NETS' ,
382- 'HOLD'
380+ 'FAILED_UNDEPLOYING_NETS'
383381 ]
384382
385383 # Returns the string representation of the service state
@@ -450,8 +448,6 @@ def initialize(opts={})
450448 @user_agent = "OpenNebula #{ CloudClient ::VERSION } " <<
451449 "(#{ opts [ :user_agent ] ||"Ruby" } )"
452450
453- @req_content_type = opts [ :req_content_type ] || "application/json"
454-
455451 @host = nil
456452 @port = nil
457453
@@ -509,7 +505,6 @@ def do_request(req)
509505 req [ 'User-Agent' ] = @user_agent
510506 req [ 'X-ONEGATE-TOKEN' ] = @token
511507 req [ 'X-ONEGATE-VMID' ] = @vmid
512- req [ 'Content-Type' ] = @req_content_type
513508
514509 res = CloudClient ::http_start ( @uri , @timeout ) do |http |
515510 http . request ( req )
@@ -563,26 +558,32 @@ def self.print_key_value(key, value)
563558
564559 def self . help_str
565560 return <<-EOT
566- ## COMMANDS
567-
568- * onegate vm show [VMID] [--json]
569- * onegate vm update [VMID] --data KEY=VALUE\\ nKEY2=VALUE2
570- * onegate vm update [VMID] --erase KEY
571- * onegate vm ACTION VMID
572- * onegate resume [VMID]
573- * onegate stop [VMID]
574- * onegate suspend [VMID]
575- * onegate terminate [VMID] [--hard]
576- * onegate reboot [VMID] [--hard]
577- * onegate poweroff [VMID] [--hard]
578- * onegate resched [VMID]
579- * onegate unresched [VMID]
580- * onegate hold [VMID]
581- * onegate release [VMID]
582- * onegate service show [--json][--extended]
583- * onegate service scale --role ROLE --cardinality CARDINALITY
584- * onegate vrouter show [--json]
585- * onegate vnet show VNETID [--json][--extended]
561+ Available commands
562+ $ onegate vm show [VMID] [--json]
563+
564+ $ onegate vm update [VMID] --data KEY=VALUE\\ nKEY2=VALUE2
565+
566+ $ onegate vm update [VMID] --erase KEY
567+
568+ $ onegate vm ACTION VMID
569+ $ onegate resume [VMID]
570+ $ onegate stop [VMID]
571+ $ onegate suspend [VMID]
572+ $ onegate terminate [VMID] [--hard]
573+ $ onegate reboot [VMID] [--hard]
574+ $ onegate poweroff [VMID] [--hard]
575+ $ onegate resched [VMID]
576+ $ onegate unresched [VMID]
577+ $ onegate hold [VMID]
578+ $ onegate release [VMID]
579+
580+ $ onegate service show [--json][--extended]
581+
582+ $ onegate service scale --role ROLE --cardinality CARDINALITY
583+
584+ $ onegate vrouter show [--json]
585+
586+ $ onegate vnet show VNETID [--json][--extended]
586587EOT
587588 end
588589end
@@ -814,4 +815,3 @@ def self.help_str
814815 STDERR . puts OneGate . help_str
815816 exit -1
816817end
817-
0 commit comments