lib/runcible/extensions/repository.rb in runcible-0.2.0 vs lib/runcible/extensions/repository.rb in runcible-0.2.1
- old
+ new
@@ -115,9 +115,16 @@
criteria[:filters][:unit] = { :id=>{ '$in' => optional[:distribution_ids] } } if optional[:distribution_ids]
payload = {:criteria => criteria}
unit_copy(destination_repo_id, source_repo_id, payload)
end
+ def self.package_group_copy(source_repo_id, destination_repo_id, optional={})
+ criteria = {:type_ids => [Runcible::Extensions::PackageGroup::TYPE], :filters => {}}
+ criteria[:filters][:unit] = { :id=>{ '$in' => optional[:package_group_ids] } } if optional[:package_group_ids]
+ payload = {:criteria => criteria}
+ unit_copy(destination_repo_id, source_repo_id, payload)
+ end
+
def self.distribution_remove(repo_id, distribution_id)
criteria = {:type_ids => ['distribution'], :filters => {}}
criteria[:filters][:unit] = { :id=>{ '$in' => [distribution_id] } }
self.unassociate_units(repo_id, criteria)
end