Class: NexposeSCCM::DeploymentPackage
- Inherits:
-
Object
- Object
- NexposeSCCM::DeploymentPackage
- Defined in:
- lib/nexpose_sccm/deployment_package.rb
Instance Attribute Summary collapse
-
#collection_name ⇒ Object
Returns the value of attribute collection_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#sug_name ⇒ Object
readonly
Returns the value of attribute sug_name.
Instance Method Summary collapse
- #download_updates(conn) ⇒ Object
-
#initialize(name, sug_name, path, id = nil, collection_name = nil, deployment_type = 'Available') ⇒ DeploymentPackage
constructor
A new instance of DeploymentPackage.
- #save(conn) ⇒ Object
Constructor Details
#initialize(name, sug_name, path, id = nil, collection_name = nil, deployment_type = 'Available') ⇒ DeploymentPackage
Returns a new instance of DeploymentPackage.
6 7 8 9 10 11 12 13 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 6 def initialize(name,sug_name,path,id=nil,collection_name=nil,deployment_type='Available') @name = name @id = id @sug_name = sug_name @path = path @collection_name = collection_name @deployment_type = deployment_type end |
Instance Attribute Details
#collection_name ⇒ Object
Returns the value of attribute collection_name.
4 5 6 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 4 def collection_name @collection_name end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 3 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 3 def path @path end |
#sug_name ⇒ Object (readonly)
Returns the value of attribute sug_name.
3 4 5 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 3 def sug_name @sug_name end |
Instance Method Details
#download_updates(conn) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 27 def download_updates(conn) NexposeSCCM.logger.debug("Downloading updates for #{sug_name}") Powershell.run(conn.conn, :download_software_updates, conn.location, @name, @sug_name, @path) end |
#save(conn) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/nexpose_sccm/deployment_package.rb', line 15 def save(conn) NexposeSCCM.logger.info("Created Deployment Package: #{@name}") NexposeSCCM.logger.debug("Deployment package has path [#{@path}]") Powershell.run(conn.conn, :create_deployment_package, conn.namespace, conn.host, @name, @name, @path) end |