    # File lib/fog/vsphere/compute.rb, line 137
            def parent_attribute path, type
              element = case type
                          when :datacenter
                            RbVmomi::VIM::Datacenter
                          when :cluster
                            RbVmomi::VIM::ClusterComputeResource
                          when :host
                            RbVmomi::VIM::HostSystem
                          else
                            raise "Unknown type"
                        end
              path.select {|x| x[0].is_a? element}.flatten
            rescue
              nil
            end