Class: Azure::CloudServiceManagement::Deployment

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/cloud_service_management/deployment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Deployment

Returns a new instance of Deployment.

Yields:

  • (_self)

Yield Parameters:



19
20
21
# File 'lib/azure/cloud_service_management/deployment.rb', line 19

def initialize
  yield self if block_given?
end

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration.



29
30
31
# File 'lib/azure/cloud_service_management/deployment.rb', line 29

def configuration
  @configuration
end

#created_timeObject

Returns the value of attribute created_time.



36
37
38
# File 'lib/azure/cloud_service_management/deployment.rb', line 36

def created_time
  @created_time
end

#deployment_slotObject

Returns the value of attribute deployment_slot.



24
25
26
# File 'lib/azure/cloud_service_management/deployment.rb', line 24

def deployment_slot
  @deployment_slot
end

#extended_propertiesObject

Returns the value of attribute extended_properties.



38
39
40
# File 'lib/azure/cloud_service_management/deployment.rb', line 38

def extended_properties
  @extended_properties
end

#labelObject

Returns the value of attribute label.



27
28
29
# File 'lib/azure/cloud_service_management/deployment.rb', line 27

def label
  @label
end

#last_modified_timeObject

Returns the value of attribute last_modified_time.



37
38
39
# File 'lib/azure/cloud_service_management/deployment.rb', line 37

def last_modified_time
  @last_modified_time
end

#lockedObject

Returns the value of attribute locked.



34
35
36
# File 'lib/azure/cloud_service_management/deployment.rb', line 34

def locked
  @locked
end

#nameObject

Returns the value of attribute name.



23
24
25
# File 'lib/azure/cloud_service_management/deployment.rb', line 23

def name
  @name
end

#persistent_vm_downtimeObject

Returns the value of attribute persistent_vm_downtime.



39
40
41
# File 'lib/azure/cloud_service_management/deployment.rb', line 39

def persistent_vm_downtime
  @persistent_vm_downtime
end

#private_idObject

Returns the value of attribute private_id.



25
26
27
# File 'lib/azure/cloud_service_management/deployment.rb', line 25

def private_id
  @private_id
end

#role_instancesObject

Returns the value of attribute role_instances.



30
31
32
# File 'lib/azure/cloud_service_management/deployment.rb', line 30

def role_instances
  @role_instances
end

#rolesObject

Returns the value of attribute roles.



32
33
34
# File 'lib/azure/cloud_service_management/deployment.rb', line 32

def roles
  @roles
end

#rollback_allowedObject

Returns the value of attribute rollback_allowed.



35
36
37
# File 'lib/azure/cloud_service_management/deployment.rb', line 35

def rollback_allowed
  @rollback_allowed
end

#sdk_versionObject

Returns the value of attribute sdk_version.



33
34
35
# File 'lib/azure/cloud_service_management/deployment.rb', line 33

def sdk_version
  @sdk_version
end

#statusObject

Returns the value of attribute status.



26
27
28
# File 'lib/azure/cloud_service_management/deployment.rb', line 26

def status
  @status
end

#upgrade_domain_countObject

Returns the value of attribute upgrade_domain_count.



31
32
33
# File 'lib/azure/cloud_service_management/deployment.rb', line 31

def upgrade_domain_count
  @upgrade_domain_count
end

#urlObject

Returns the value of attribute url.



28
29
30
# File 'lib/azure/cloud_service_management/deployment.rb', line 28

def url
  @url
end

#virtual_ipsObject

Returns the value of attribute virtual_ips.



40
41
42
# File 'lib/azure/cloud_service_management/deployment.rb', line 40

def virtual_ips
  @virtual_ips
end

Instance Method Details

#all_vms_running?Boolean

Returns:

  • (Boolean)


42
43
44
45
46
47
48
# File 'lib/azure/cloud_service_management/deployment.rb', line 42

def all_vms_running?
  if role_instances.nil? || role_instances.empty?
    return false
  else
    return role_instances.all? { |vm| vm.is_running }
  end
end

#exists?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/azure/cloud_service_management/deployment.rb', line 54

def exists?
  return !deployment_slot.nil? && !name.nil? && !deployment_slot.empty? && !name.empty?
end

#is_transitioning?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/azure/cloud_service_management/deployment.rb', line 50

def is_transitioning?
  return status.casecmp("runningtransitioning") == 0
end