openstudio-aws 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openstudio/aws/version.rb +1 -1
- data/lib/openstudio/lib/os-aws.rb +18 -13
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4624c9a6d3d224d6f9027d2b9ad3656825425f9a
|
4
|
+
data.tar.gz: dd87ae4236d716745c7c9b7789734b576ba61925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63b655b893617754e33982fe73841efb33819c5ccb49577ec27eae3b489e7b6ea35e22aa22bbb486c4e2b51dcce2aafa4c5a7931b979823de113902fc7188eb
|
7
|
+
data.tar.gz: 55a4d419a28279db424a213a2537f4472db04762fbeb399490e453b45a14e61fd398bcd114485e097a2ac00d7e2dfd833e73eb8e639ee400185bd403227cfdfd
|
@@ -45,8 +45,6 @@ require 'net/ssh'
|
|
45
45
|
require 'tempfile'
|
46
46
|
require 'time'
|
47
47
|
|
48
|
-
OPENSTUDIO_VERSION='1.1.4'
|
49
|
-
|
50
48
|
def error(code, msg)
|
51
49
|
puts ({:error => {:code => code, :message => msg},
|
52
50
|
:arguments => ARGV[2..-1]}.to_json)
|
@@ -90,21 +88,28 @@ end
|
|
90
88
|
|
91
89
|
if ARGV.length == 6
|
92
90
|
@params = JSON.parse(ARGV[5])
|
91
|
+
OPENSTUDIO_VERSION = @params['openstudio_version'] if @params.include?('openstudio_version')
|
92
|
+
@server_image_id = @params['server_ami'] if @params.include?('server_ami')
|
93
|
+
@worker_image_id = @params['worker_ami'] if @params.include?('worker_ami')
|
93
94
|
end
|
94
95
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
OPENSTUDIO_VERSION = '1.1.4' unless defined?(OPENSTUDIO_VERSION)
|
97
|
+
|
98
|
+
if (!defined?(@server_image_id) || !defined?(@worker_image_id))
|
99
|
+
resp = Net::HTTP.get_response('developer.nrel.gov','/downloads/buildings/openstudio/rsrc/amis.json')
|
100
|
+
if resp.code == '200'
|
101
|
+
result = JSON.parse(resp.body)
|
102
|
+
version = result.has_key?(OPENSTUDIO_VERSION) ? OPENSTUDIO_VERSION : 'default'
|
99
103
|
|
100
|
-
|
101
|
-
|
102
|
-
|
104
|
+
@server_image_id = result[version]['server']
|
105
|
+
if ARGV.length >= 6 && @params['instance_type'] == 'cc2.8xlarge'
|
106
|
+
@worker_image_id = result[version]['cc2worker']
|
107
|
+
else
|
108
|
+
@worker_image_id = result[version]['worker']
|
109
|
+
end
|
103
110
|
else
|
104
|
-
|
111
|
+
error(resp.code, 'Unable to download AMI IDs')
|
105
112
|
end
|
106
|
-
else
|
107
|
-
error(resp.code, 'Unable to download AMI IDs')
|
108
113
|
end
|
109
114
|
|
110
115
|
def create_struct(instance, procs)
|
@@ -345,7 +350,7 @@ def download_file(host, remote_path, local_path)
|
|
345
350
|
end
|
346
351
|
|
347
352
|
begin
|
348
|
-
@logger = Logger.new("aws.log")
|
353
|
+
@logger = Logger.new(File.expand_path("~/.aws.log"))
|
349
354
|
@logger.info("initialized")
|
350
355
|
case ARGV[4]
|
351
356
|
when 'describe_availability_zones'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.30.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.30.1
|
41
41
|
description: Custom classes for configuring clusters for OpenStudio & EnergyPlus analyses
|
42
42
|
email:
|
43
43
|
- Nicholas.Long@nrel.gov
|