~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/github.com/juju/utils/packaging/config/configurer_yum.go

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2015 Canonical Ltd.
 
2
// Copyright 2015 Cloudbase Solutions SRL
 
3
// Licensed under the LGPLv3, see LICENCE file for details.
 
4
 
 
5
package config
 
6
 
 
7
import (
 
8
        "github.com/juju/utils/packaging"
 
9
)
 
10
 
 
11
// yumConfigurer is the PackagingConfigurer implementation for apt-based systems.
 
12
type yumConfigurer struct {
 
13
        *baseConfigurer
 
14
}
 
15
 
 
16
// RenderSource is defined on the PackagingConfigurer interface.
 
17
func (c *yumConfigurer) RenderSource(src packaging.PackageSource) (string, error) {
 
18
        return src.RenderSourceFile(YumSourceTemplate)
 
19
}
 
20
 
 
21
// RenderPreferences is defined on the PackagingConfigurer interface.
 
22
func (c *yumConfigurer) RenderPreferences(src packaging.PackagePreferences) (string, error) {
 
23
        // TODO (aznashwan): research a way of using yum-priorities in the context
 
24
        // of single/multiple package pinning and implement it.
 
25
        return "", nil
 
26
}
 
27
 
 
28
// ApplyCloudArchiveTarget is defined on the PackagingConfigurer interface.
 
29
func (c *yumConfigurer) ApplyCloudArchiveTarget(pack string) []string {
 
30
        // TODO (aznashwan): implement target application when archive is available.
 
31
        return []string{pack}
 
32
}