continuent-tools-core 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/tungsten_policy +79 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aee78c998a93c367e0607691f4714d4fb6e0116b
|
4
|
+
data.tar.gz: ce61842a26720937f41fb0e1e3938c7bbe5ac9af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6dcf8857a4403ac9cd96d8a8ef6b6a2d27750b92026c3043f02af9d61522dbf5eedcabbcecc103efdc1c5d271e1f6c828785222746e999325204f3e8f84931c
|
7
|
+
data.tar.gz: c741cdf86e994a172cd3219b6187ec7e0b5d4e010b5f2b45e3418ca24541b910fece157a73c121e0a4c314c2f7bb88fe17a0511b1a60b7d276b254b534dae67f
|
data/bin/tungsten_policy
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2014 Continuent, Inc.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
5
|
+
# not use this file except in compliance with the License. You may obtain
|
6
|
+
# a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations
|
14
|
+
# under the License.
|
15
|
+
#
|
16
|
+
# Initial developer(s): Jeff Mace
|
17
|
+
# Contributor(s):
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'rubygems'
|
21
|
+
gem 'continuent-tools-core'
|
22
|
+
rescue LoadError
|
23
|
+
end
|
24
|
+
|
25
|
+
require 'continuent-tools-core'
|
26
|
+
|
27
|
+
class TungstenMigrateSchema
|
28
|
+
include TungstenScript
|
29
|
+
include TungstenAPI
|
30
|
+
private
|
31
|
+
|
32
|
+
def main
|
33
|
+
if opt(:set) != nil
|
34
|
+
cmd = nil
|
35
|
+
case opt(:set).downcase()
|
36
|
+
when "maintenance"
|
37
|
+
cmd = "setmaintenance"
|
38
|
+
when "automatic"
|
39
|
+
cmd = "setautomatic"
|
40
|
+
when "manual"
|
41
|
+
cmd = "setmanual"
|
42
|
+
end
|
43
|
+
|
44
|
+
mgr = TungstenDataserviceManager.new(TI.mgr_api_uri())
|
45
|
+
mgr.call(opt(:service), cmd)
|
46
|
+
end
|
47
|
+
|
48
|
+
status = TungstenStatus.new(TI, opt(:service))
|
49
|
+
TU.output(status.policy())
|
50
|
+
end
|
51
|
+
|
52
|
+
def configure
|
53
|
+
super()
|
54
|
+
|
55
|
+
add_option(:service, {
|
56
|
+
:on => "--service String",
|
57
|
+
:help => "The dataservice to check"
|
58
|
+
})
|
59
|
+
|
60
|
+
add_option(:set, {
|
61
|
+
:on => "--set String",
|
62
|
+
:help => "Policy to enable for this service"
|
63
|
+
})
|
64
|
+
end
|
65
|
+
|
66
|
+
def validate
|
67
|
+
super()
|
68
|
+
|
69
|
+
unless TU.is_valid?()
|
70
|
+
return TU.is_valid?()
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def script_name
|
75
|
+
"tungsten_policy"
|
76
|
+
end
|
77
|
+
|
78
|
+
self.new().run()
|
79
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: continuent-tools-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Continuent
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_pure
|
@@ -112,10 +112,12 @@ description:
|
|
112
112
|
email: info@continuent.com
|
113
113
|
executables:
|
114
114
|
- tungsten_create_load
|
115
|
+
- tungsten_policy
|
115
116
|
extensions: []
|
116
117
|
extra_rdoc_files: []
|
117
118
|
files:
|
118
119
|
- bin/tungsten_create_load
|
120
|
+
- bin/tungsten_policy
|
119
121
|
- lib/continuent-tools-core.rb
|
120
122
|
- lib/iniparse/document.rb
|
121
123
|
- lib/iniparse/generator.rb
|