<commit_before>require 'fog/core/model'

module Fog
  module Compute
    class XenServer
    
      class PBD < Fog::Model
        # API Reference here:
        # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PBD
        
        identity :reference
        
        attribute :uuid
        attribute :__host,             :aliases => :host
        attribute :__sr,               :aliases => :SR

        def sr
          connection.storage_repositories.get __sr
        end

        def storage_repository
          sr
        end

        def host
          connection.hosts.get __host
        end
        
        def unplug
          connection.unplug_pbd reference
        end

      end
      <commit_msg>[xenserver] add missing PBD 'currently_attached' attribute<commit_after>require 'fog/core/model'

module Fog
  module Compute
    class XenServer
    
      class PBD < Fog::Model
        # API Reference here:
        # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PBD
        
        identity :reference
        
        attribute :uuid
        attribute :__host,             :aliases => :host
        attribute :__sr,               :aliases => :SR
        attribute :currently_attached

        def sr
          connection.storage_repositories.get __sr
        end

        def storage_repository
          sr
        end

        def host
          connection.hosts.get __host
        end
        
        def unplug
          connection.unplug_pbd reference
        end

      end
      
{'fraction_non_alphanumeric': 0.06727629000653168, 'fraction_numerical': 0.006531678641410843, 'mean_word_length': 1.39375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1353758', 'n_tokens_mistral': 454, 'n_tokens_neox': 428, 'n_words': 101}