diff --git a/devops-service/db/mongo/models/stack/stack_ec2.rb b/devops-service/db/mongo/models/stack/stack_ec2.rb index 693b9d2..a3cff24 100644 --- a/devops-service/db/mongo/models/stack/stack_ec2.rb +++ b/devops-service/db/mongo/models/stack/stack_ec2.rb @@ -1,7 +1,12 @@ module Devops module Model class StackEc2 < StackBase - self.provider = 'ec2' + + def initialize attr={} + self.provider = 'ec2' + super(attr) + end + end end end diff --git a/devops-service/db/mongo/models/stack/stack_openstack.rb b/devops-service/db/mongo/models/stack/stack_openstack.rb index 13818d9..3da2e86 100644 --- a/devops-service/db/mongo/models/stack/stack_openstack.rb +++ b/devops-service/db/mongo/models/stack/stack_openstack.rb @@ -1,7 +1,11 @@ module Devops module Model class StackOpenstack < StackBase - self.provider = 'openstack' + + def initialize attr={} + self.provider = 'openstack' + super(attr) + end def stack_status details[:stack_status] || details['stack_status'] if details