Class: Fog::Hyperv::Compute::IntegrationService
- Defined in:
- lib/fog/hyperv/compute/models/integration_service.rb
Constant Summary collapse
- INTEGRATION_SERVICE_STATUS_ENUM_VALUES =
Note:
Defined by Microsoft.HyperV.PowerShell.VMIntegrationComponentOperationalStatus
Integration service statuses
{ Ok: 2, Degraded: 3, Error: 6, NonRecoverableError: 7, NoContact: 12, LostCommunication: 13, Disabled: 32_896, ProtocolMismatch: 32_775, ApplicationCritical: 32_782, CommunicationTimedOut: 32_783, CommunicationFailed: 32_784 }.freeze
Instance Attribute Summary collapse
-
#computer_name ⇒ String
readonly
The name of the computer running the VM that this integration service is attached to.
-
#enabled ⇒ Boolean
If the integration service is enabled or not.
-
#name ⇒ String
readonly
The name of the integration service.
-
#operational_status ⇒ Symbol
readonly
The statuses of the integration service.
-
#vm_id ⇒ String
readonly
The GUID of the VM this integration service is attached to.
Instance Method Summary collapse
Methods inherited from Model
Methods included from ModelExtends
Methods included from ModelIncludes
#cluster, #computer, #dirty, #dirty?, #vm
Constructor Details
This class inherits a constructor from Fog::Hyperv::Model
Instance Attribute Details
#computer_name ⇒ String (readonly)
Returns the name of the computer running the VM that this integration service is attached to.
30 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 30 attribute :computer_name |
#enabled ⇒ Boolean
Returns if the integration service is enabled or not.
37 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 37 attribute :enabled, type: :boolean |
#name ⇒ String (readonly)
Returns the name of the integration service.
26 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 26 identity :name |
#operational_status ⇒ Symbol (readonly)
Returns the statuses of the integration service.
41 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 41 attribute :operational_status, type: :hypervenumarray, values: INTEGRATION_SERVICE_STATUS_ENUM_VALUES |
#vm_id ⇒ String (readonly)
Returns the GUID of the VM this integration service is attached to.
33 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 33 attribute :vm_id |
Instance Method Details
#reload ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 55 def reload requires :name, :vm_id data = service.get_vm_integration_service computer_name: computer_name, vm_id: vm_id, name: name return unless data merge_attributes(data) end |
#update ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/fog/hyperv/compute/models/integration_service.rb', line 43 def update requires :name, :vm_id return self unless changed? :enabled method = enabled ? :enable : :disable service.send(:"#{method}_vm_integration_service", computer_name: computer_name, vm_id: vm_id, name: name) old.enabled = attributes[:enabled] self end |