Class: PatchCatalog

Inherits:
BsaSoapBase show all
Defined in:
lib/bl_soap/patch_catalog.rb

Constant Summary

Constants inherited from BsaSoapBase

BsaSoapBase::CLI_SERVICE, BsaSoapBase::CLI_WSDL, BsaSoapBase::DEFAULT_AUTH_TYPE, BsaSoapBase::HTTP_READ_TIMEOUT, BsaSoapBase::LOGIN_SERVICE, BsaSoapBase::LOGIN_WSDL, BsaSoapBase::ROLE_SERVICE, BsaSoapBase::ROLE_WSDL

Instance Method Summary collapse

Methods inherited from BsaSoapBase

#execute_cli_with_attachments, #execute_cli_with_param_list, #get_all_servers, #get_cli_return_value, #initialize, #validate_cli_option_hash_string_values, #validate_cli_options_hash, #validate_cli_result, #validate_servers

Constructor Details

This class inherits a constructor from BsaSoapBase

Instance Method Details

#delete_obsolete_patches_from_aix_catalog(options = {}) ⇒ Object



25
26
27
28
29
# File 'lib/bl_soap/patch_catalog.rb', line 25

def delete_obsolete_patches_from_aix_catalog( options = {})
  deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromAixCatalog", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#delete_obsolete_patches_from_other_linux_catalog(options = {}) ⇒ Object



31
32
33
34
35
# File 'lib/bl_soap/patch_catalog.rb', line 31

def delete_obsolete_patches_from_other_linux_catalog(options = {})
  deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromOtherLinuxCatalog", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#delete_obsolete_patches_from_redhat_linux_catalog(options = {}) ⇒ Object



37
38
39
40
41
# File 'lib/bl_soap/patch_catalog.rb', line 37

def delete_obsolete_patches_from_redhat_linux_catalog(options = {})
  deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromRedhatLinuxCatalog", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#delete_obsolete_patches_from_solaris_catalog(options = {}) ⇒ Object



43
44
45
46
47
# File 'lib/bl_soap/patch_catalog.rb', line 43

def delete_obsolete_patches_from_solaris_catalog(options = {})
  deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromSolarisCatalog", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#delete_obsolete_patches_from_windows_catalog(options = {}) ⇒ Object



49
50
51
52
53
# File 'lib/bl_soap/patch_catalog.rb', line 49

def delete_obsolete_patches_from_windows_catalog(options = {})
  deleted_count = self.internal_delete_obsolete_patches("deleteObsoletePatchesFromWindowsCatalog", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#execute_aix_catalog_update_and_wait(options = {}) ⇒ Object



55
56
57
58
59
# File 'lib/bl_soap/patch_catalog.rb', line 55

def execute_aix_catalog_update_and_wait(options = {})
  job_run_key = self.internal_delete_obsolete_patches("executeAixCatalogUpdateAndWait", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#execute_other_linux_catalog_update_and_wait(options = {}) ⇒ Object



61
62
63
64
65
# File 'lib/bl_soap/patch_catalog.rb', line 61

def execute_other_linux_catalog_update_and_wait(options = {})
  job_run_key = self.internal_delete_obsolete_patches("executeOtherLinuxCatalogUpdateAndWait", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#execute_redhat_catalog_update_and_wait(options = {}) ⇒ Object



67
68
69
70
71
# File 'lib/bl_soap/patch_catalog.rb', line 67

def execute_redhat_catalog_update_and_wait(options = {})
  job_run_key = self.internal_delete_obsolete_patches("executeRedhatCatalogUpdateAndWait", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#execute_solaris_catalog_update_and_wait(options = {}) ⇒ Object



73
74
75
76
77
# File 'lib/bl_soap/patch_catalog.rb', line 73

def execute_solaris_catalog_update_and_wait(options = {})
  job_run_key = self.internal_delete_obsolete_patches("executeSolarisCatalogUpdateAndWait", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#execute_windows_catalog_update_and_wait(options = {}) ⇒ Object



79
80
81
82
83
# File 'lib/bl_soap/patch_catalog.rb', line 79

def execute_windows_catalog_update_and_wait(options = {})
  job_run_key = self.internal_delete_obsolete_patches("executeWindowsCatalogUpdateAndWait", options)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#get_cuj_dbkey_by_fully_qualified_catalog_name(options = {}) ⇒ Object



85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/bl_soap/patch_catalog.rb', line 85

def get_cuj_dbkey_by_fully_qualified_catalog_name(options = {})
  validate_cli_options_hash([:type, :group_name], options)
  validate_cli_option_hash_string_values(["WINDOWS", "REDHAT", "SOLARIS", "AIX", "OTHERLINUX"],options[:type])
  db_key_result = execute_cli_with_param_list(self.class, "getCUJDBKeyByFullyQualifiedCatalogName",
    [
      options[:type],   # Type of catalog: WINDOWS, REDHAT, SOLARIS, AIX, OTHERLINUX

      option[:group_name] # Fully qualified name of patch catalog

    ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#get_dbkey_by_type_and_name_from_catalog(options = {}) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/bl_soap/patch_catalog.rb', line 98

def get_dbkey_by_type_and_name_from_catalog(options = {})
  validate_cli_options_hash([:depot_group_type, :depot_object_type, :group_name, :depot_object_name], options)
  validate_cli_options_hash_string_values(
    [
      "RED_HAT_CATALOG_GROUP",  # RedHat Catalog

      "SOLARIS_CATALOG_GROUP",  # Solaris Catalog

      "WINDOWS_CATALOG_GROUP",  # Windows Catalog

      "OTHER_LINUX_CATALOG_GROUP" # Other Linux Catalog

    ], options[:depot_group_type])
  validate_cli_options_hash_string_values(
    [
      "AIX_FILESET_INSTALLABLE",        # AIX Fileset

      "AIX_CONTAINER_INSTALLABLE",      # AIX Patch Container

      "RPM_INSTALLABLE",            # Linux RPM

      "ERRATA_INSTALLABLE",         # Linux Errata

      "SOLARIS_PATCH_INSTALLABLE",      # Solaris Path

      "SOLARIS_PATCH_TCLUSTER_INSTALLABLE", # Solaris Cluster

      "HOTFIX_WINDOWS_INSTALLABLE",       # Windows HotFix

      "WINDOWS_BULLETIN_INSTALLABLE"      # Windows Bulletin

    ], options[:dept_object_type])
  db_key = execute_cli_with_param_list(self.class, "getDBKeyByTypeAndNameFromCatalog",
    [
      options[:depot_group_type],   # String representation of catalog type

      options[:depot_object_type],  # String representation of depot object type

      options[:group_name],     # Fully qualified path to parent depot group

      options[:depot_object_name]   # Name of depot object

    ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#internal_delete_obsolete_patches(cmd, options = {}) ⇒ Object

internal function



3
4
5
6
7
8
9
10
11
12
# File 'lib/bl_soap/patch_catalog.rb', line 3

def internal_delete_obsolete_patches(cmd, options = {})
  validate_cli_options_hash([:catalog_name], options)
  deleted_count_result = execute_cli_with_param_list(self.class, cmd,
    [
      options[:catalog_name]  # Fully qualified catalog name

    ])
  deleted_count = get_cli_return_value(deleted_count_result)
rescue => exception
  raise "Problem executing #{self.class} command(#{cmd}): #{exception.to_s}"
end

#internal_execute_update_and_wait(cmd, options = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/bl_soap/patch_catalog.rb', line 14

def internal_execute_update_and_wait(cmd, options = {})
  validate_cli_options_hash([:group_name], options)
  job_run_key_result = execute_cli_with_param_list(self.class, cmd,
    [
      options[:group_name]  # Fully qualified catalog name

    ])
  job_run_key = get_cli_return_value(job_run_key_result)
rescue => exception
  raise "Problem executing #{self.class} command(#{cmd}): #{exception.to_s}"
end

#list_all_by_catalog_name_and_type(options = {}) ⇒ Object



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/bl_soap/patch_catalog.rb', line 130

def list_all_by_catalog_name_and_type(options = {})
  validate_cli_options_hash([:qualified_group_name, :catalog_type_string], options)
  validate_cli_options_hash_string_values(
    [
      "WINDOWS_CATALOG_GROUP",    # Windows Catalog

      "SOLARIS_CATALOG_GROUP",    # Solaris Catalog

      "RED_HAT_CATALOG_GROUP",    # Redhat Catalog

      "OTHER_LINUX_CATALOG_GROUP",  # Other Linux Catalog

      "AIX_CATALOG_GROUP"       # AIX Catalog

    ], options[:catalog_type_string])
  string_result = execute_cli_with_param_list(self.class, "listAllByCatalogNameAndType",
    [
      options[:qualified_group_name], # Name of depot group whose objects you want to list

      options[:catalog_type_string] # String representation of depot object type

    ])
  str_value = get_cli_return_value(dstring_result)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end

#recursively_set_property_for_catalog(options = {}) ⇒ Object



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/bl_soap/patch_catalog.rb', line 150

def recursively_set_property_for_catalog(options ={})
  validate_cli_options_hash([:group_path, :property_name, :value, :catalog_type_string], options)
  validate_cli_options_hash_string_values(
    [
      "RPM_INSTALLABLE",            # Linux RPM

      "SOLARIS_PATCH_INSTALLABLE",      # Solaris Patch

      "HOTFIX_WINDOWS_INSTALLABLE",     # Windows HotFix

      "WINDOWS_BULLETIN_INSTALLABLE",     # Windows Bulletin

      "ERRATA_INSTALLABLE",         # Redhat Errata

      "SOLARIS_PATCH_TCLUSTER_INSTALLABLE", # Solaris Patch Cluster

      "AIX_FILESET_INSTALLABLE",        # AIX Fileset

      "AIX_CONTAINER_INSTALLABLE"       # AIX Container

    ], options[:catalog_type_string])
  void_result = execute_cli_with_param_list(self.class, "recursivelySetPropertyForCatalog",
    [
      options[:group_path],     # The path to the folder

      options[:property_name],    # The name of the property to set

      options[:value],        # The value to set

      options[:catalog_type_string] # String representation of depot object type

    ])
  void_value = get_cli_return_value(void_result)
rescue => exception
  raise "#{self.class} Execution Exception: #{exception.to_s}"
end