Sha256: 1d3c88b2e9f8b2d6bd45ce23a543eccca92dc24390c4c7b4e2addf6e5f92edc7

Contents?: true

Size: 1.44 KB

Versions: 14

Compression:

Stored size: 1.44 KB

Contents

# Copyright:: Copyright (c) 2020 eGlobalTech, Inc., all rights reserved
#
# Licensed under the BSD-3 license (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the root of the project or at
#
#     http://egt-labs.com/mu/LICENSE.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module MU
  # Plugins under this namespace serve as interfaces to cloud providers and
  # other provisioning layers.
  class Cloud

    # Generic methods for all Server/ServerPool implementations
    [:Server, :ServerPool].each { |name|
      Object.const_get("MU").const_get("Cloud").const_get(name).class_eval {

        def windows?
          return true if %w{win2k16 win2k12r2 win2k12 win2k8 win2k8r2 win2k19 windows}.include?(@config['platform'])
          begin
            return true if cloud_desc.respond_to?(:platform) and cloud_desc.platform == "Windows"
# XXX ^ that's AWS-speak, doesn't cover GCP or anything else; maybe we should require cloud layers to implement this so we can just call @cloudobj.windows?
          rescue MU::MuError
            return false
          end
          false
        end

      }
    }

  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cloud-mu-3.6.10 modules/mu/cloud/server.rb
cloud-mu-3.6.9 modules/mu/cloud/server.rb
cloud-mu-3.6.8 modules/mu/cloud/server.rb
cloud-mu-3.6.7 modules/mu/cloud/server.rb
cloud-mu-3.6.5 modules/mu/cloud/server.rb
cloud-mu-3.6.4 modules/mu/cloud/server.rb
cloud-mu-3.6.3 modules/mu/cloud/server.rb
cloud-mu-3.5.1 modules/mu/cloud/server.rb
cloud-mu-3.5.0 modules/mu/cloud/server.rb
cloud-mu-3.4.0 modules/mu/cloud/server.rb
cloud-mu-3.3.2 modules/mu/cloud/server.rb
cloud-mu-3.3.1 modules/mu/cloud/server.rb
cloud-mu-3.3.0 modules/mu/cloud/server.rb
cloud-mu-3.2.0 modules/mu/cloud/server.rb