mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
Identity v3 support for Swift
ncw/swift was bumped to latest version
This commit is contained in:
@@ -11,7 +11,7 @@ gom 'github.com/julienschmidt/httprouter', :commit => '46807412fe50aaceb73bb5706
|
|||||||
gom 'github.com/mattn/go-shellwords', :commit => 'c7ca6f94add751566a61cf2199e1de78d4c3eee4'
|
gom 'github.com/mattn/go-shellwords', :commit => 'c7ca6f94add751566a61cf2199e1de78d4c3eee4'
|
||||||
gom 'github.com/mkrautz/goar', :commit => '282caa8bd9daba480b51f1d5a988714913b97aad'
|
gom 'github.com/mkrautz/goar', :commit => '282caa8bd9daba480b51f1d5a988714913b97aad'
|
||||||
gom 'github.com/mxk/go-flowrate/flowrate', :commit => 'cca7078d478f8520f85629ad7c68962d31ed7682'
|
gom 'github.com/mxk/go-flowrate/flowrate', :commit => 'cca7078d478f8520f85629ad7c68962d31ed7682'
|
||||||
gom 'github.com/ncw/swift', :commit => '384ef27c70645e285f8bb9d02276bf654d06027e'
|
gom 'github.com/ncw/swift', :commit => 'b964f2ca856aac39885e258ad25aec08d5f64ee6'
|
||||||
gom 'github.com/smira/go-aws-auth', :commit => '0070896e9d7f4f9f2d558532b2d896ce2239992a'
|
gom 'github.com/smira/go-aws-auth', :commit => '0070896e9d7f4f9f2d558532b2d896ce2239992a'
|
||||||
gom 'github.com/smira/go-xz', :commit => '0c531f070014e218b21f3cfca801cc992d52726d'
|
gom 'github.com/smira/go-xz', :commit => '0c531f070014e218b21f3cfca801cc992d52726d'
|
||||||
gom 'github.com/smira/commander', :commit => 'f408b00e68d5d6e21b9f18bd310978dafc604e47'
|
gom 'github.com/smira/commander', :commit => 'f408b00e68d5d6e21b9f18bd310978dafc604e47'
|
||||||
|
|||||||
+1
-1
@@ -337,7 +337,7 @@ func (context *AptlyContext) GetPublishedStorage(name string) aptly.PublishedSto
|
|||||||
|
|
||||||
var err error
|
var err error
|
||||||
publishedStorage, err = swift.NewPublishedStorage(params.UserName, params.Password,
|
publishedStorage, err = swift.NewPublishedStorage(params.UserName, params.Password,
|
||||||
params.AuthURL, params.Tenant, params.TenantID, params.Container, params.Prefix)
|
params.AuthURL, params.Tenant, params.TenantID, params.Domain, params.DomainID, params.TenantDomain, params.TenantDomainID, params.Container, params.Prefix)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Fatal(err)
|
Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-1
@@ -29,7 +29,7 @@ var (
|
|||||||
|
|
||||||
// NewPublishedStorage creates new instance of PublishedStorage with specified Swift access
|
// NewPublishedStorage creates new instance of PublishedStorage with specified Swift access
|
||||||
// keys, tenant and tenantId
|
// keys, tenant and tenantId
|
||||||
func NewPublishedStorage(username string, password string, authURL string, tenant string, tenantID string, container string, prefix string) (*PublishedStorage, error) {
|
func NewPublishedStorage(username string, password string, authURL string, tenant string, tenantID string, domain string, domainID string, tenantDomain string, tenantDomainID string, container string, prefix string) (*PublishedStorage, error) {
|
||||||
if username == "" {
|
if username == "" {
|
||||||
if username = os.Getenv("OS_USERNAME"); username == "" {
|
if username = os.Getenv("OS_USERNAME"); username == "" {
|
||||||
username = os.Getenv("ST_USER")
|
username = os.Getenv("ST_USER")
|
||||||
@@ -51,6 +51,18 @@ func NewPublishedStorage(username string, password string, authURL string, tenan
|
|||||||
if tenantID == "" {
|
if tenantID == "" {
|
||||||
tenantID = os.Getenv("OS_TENANT_ID")
|
tenantID = os.Getenv("OS_TENANT_ID")
|
||||||
}
|
}
|
||||||
|
if domain == "" {
|
||||||
|
domain = os.Getenv("OS_USER_DOMAIN_NAME")
|
||||||
|
}
|
||||||
|
if domainID == "" {
|
||||||
|
domainID = os.Getenv("OS_USER_DOMAIN_ID")
|
||||||
|
}
|
||||||
|
if tenantDomain == "" {
|
||||||
|
tenantDomain = os.Getenv("OS_PROJECT_DOMAIN")
|
||||||
|
}
|
||||||
|
if tenantDomainID == "" {
|
||||||
|
tenantDomainID = os.Getenv("OS_PROJECT_DOMAIN_ID")
|
||||||
|
}
|
||||||
|
|
||||||
ct := swift.Connection{
|
ct := swift.Connection{
|
||||||
UserName: username,
|
UserName: username,
|
||||||
@@ -59,6 +71,10 @@ func NewPublishedStorage(username string, password string, authURL string, tenan
|
|||||||
UserAgent: "aptly/" + aptly.Version,
|
UserAgent: "aptly/" + aptly.Version,
|
||||||
Tenant: tenant,
|
Tenant: tenant,
|
||||||
TenantId: tenantID,
|
TenantId: tenantID,
|
||||||
|
Domain: domain,
|
||||||
|
DomainId: domainID,
|
||||||
|
TenantDomain: tenantDomain,
|
||||||
|
TenantDomainId: tenantDomainID,
|
||||||
ConnectTimeout: 60 * time.Second,
|
ConnectTimeout: 60 * time.Second,
|
||||||
Timeout: 60 * time.Second,
|
Timeout: 60 * time.Second,
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-7
@@ -46,13 +46,17 @@ type S3PublishRoot struct {
|
|||||||
|
|
||||||
// SwiftPublishRoot describes single OpenStack Swift publishing entry point
|
// SwiftPublishRoot describes single OpenStack Swift publishing entry point
|
||||||
type SwiftPublishRoot struct {
|
type SwiftPublishRoot struct {
|
||||||
UserName string `json:"osname"`
|
UserName string `json:"osname"`
|
||||||
Password string `json:"password"`
|
Password string `json:"password"`
|
||||||
AuthURL string `json:"authurl"`
|
AuthURL string `json:"authurl"`
|
||||||
Tenant string `json:"tenant"`
|
Tenant string `json:"tenant"`
|
||||||
TenantID string `json:"tenantid"`
|
TenantID string `json:"tenantid"`
|
||||||
Prefix string `json:"prefix"`
|
Domain string `json:"domain"`
|
||||||
Container string `json:"container"`
|
DomainID string `json:"domainid"`
|
||||||
|
TenantDomain string `json:"tenantdomain"`
|
||||||
|
TenantDomainID string `json:"tenantdomainid"`
|
||||||
|
Prefix string `json:"prefix"`
|
||||||
|
Container string `json:"container"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Config is configuration for aptly, shared by all modules
|
// Config is configuration for aptly, shared by all modules
|
||||||
|
|||||||
Reference in New Issue
Block a user