mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-12 03:21:33 +00:00
Fix config tests and update man page
Fix ConfigSuite.TestSaveConfig, ConfigShowTest and CreateConfigTest tests
This commit is contained in:
committed by
Sylvain Baubeau
parent
11716f06f0
commit
0f22dc590a
@@ -52,6 +52,18 @@ Configuration file is stored in JSON format (default values shown below):
|
||||
"encryptionMethod": "",
|
||||
"plusWorkaround": false
|
||||
}
|
||||
},
|
||||
"SwiftPublishEndpoints": {
|
||||
"test": {
|
||||
"container": "repo",
|
||||
"osname": "",
|
||||
"password": "",
|
||||
"prefix": "",
|
||||
"authurl": "",
|
||||
"tenant": "",
|
||||
"tenantid": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Options:
|
||||
@@ -144,6 +156,31 @@ publishing prefix on the command line, e.g.:
|
||||
|
||||
`aptly publish snapshot wheezy-main s3:test:`
|
||||
|
||||
## OPENSTACK SWIFT PUBLISHING ENDPOINTS
|
||||
|
||||
aptly could be configured to publish repository directly to OpenStack Swift. First,
|
||||
publishing endpoints should be described in aptly configuration file. Each endpoint
|
||||
has name and associated settings:
|
||||
|
||||
* `container`:
|
||||
container name
|
||||
* `prefix`:
|
||||
(optional) do publishing under specified prefix in the container, defaults to
|
||||
no prefix (container root)
|
||||
* `osname`, `password`:
|
||||
(optional) OpenStack credentials to access Keystone. If not supplied,
|
||||
environment variables `OS_USERNAME` and `OS_PASSWORD` are used.
|
||||
* `tenant`, `tenantid`:
|
||||
(optional) OpenStack tenant name and id (in order to use v2 authentication).
|
||||
* `authurl`:
|
||||
(optional) the full url of Keystone server (including port, and version).
|
||||
example `http://identity.example.com:5000/v2.0`
|
||||
|
||||
In order to publish to Swift, specify endpoint as `swift:endpoint-name:` before
|
||||
publishing prefix on the command line, e.g.:
|
||||
|
||||
`aptly publish snapshot jessie-main swift:test:`
|
||||
|
||||
## PACKAGE QUERY
|
||||
|
||||
Some commands accept package queries to identify list of packages to process.
|
||||
@@ -299,4 +336,4 @@ Options:
|
||||
* -`{{.Name}}`={{.DefValue}}:
|
||||
{{.Usage}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
"S3PublishEndpoints": {}
|
||||
"S3PublishEndpoints": {},
|
||||
"SwiftPublishEndpoints": {}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@
|
||||
"downloadSourcePackages": false,
|
||||
"ppaDistributorID": "ubuntu",
|
||||
"ppaCodename": "",
|
||||
"S3PublishEndpoints": {}
|
||||
"S3PublishEndpoints": {},
|
||||
"SwiftPublishEndpoints": {}
|
||||
}
|
||||
@@ -34,6 +34,9 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
Region: "us-east-1",
|
||||
Bucket: "repo"}}
|
||||
|
||||
s.config.SwiftPublishRoots = map[string]SwiftPublishRoot{"test": SwiftPublishRoot{
|
||||
Container: "repo"}}
|
||||
|
||||
err := SaveConfig(configname, &s.config)
|
||||
c.Assert(err, IsNil)
|
||||
|
||||
@@ -71,6 +74,17 @@ func (s *ConfigSuite) TestSaveConfig(c *C) {
|
||||
" \"encryptionMethod\": \"\",\n"+
|
||||
" \"plusWorkaround\": false\n"+
|
||||
" }\n"+
|
||||
" },\n"+
|
||||
" \"SwiftPublishEndpoints\": {\n" +
|
||||
" \"test\": {\n"+
|
||||
" \"osname\": \"\",\n"+
|
||||
" \"password\": \"\",\n"+
|
||||
" \"authurl\": \"\",\n"+
|
||||
" \"tenant\": \"\",\n"+
|
||||
" \"tenantid\": \"\",\n"+
|
||||
" \"prefix\": \"\",\n"+
|
||||
" \"container\": \"repo\"\n"+
|
||||
" }\n"+
|
||||
" }\n"+
|
||||
"}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user