mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #1060 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-host-convert-respect-keystone-protocol to release/2.5.0
* commit 'a7faa9b318f8bb6c36ce70ddadc20d9a472728b3': minor changes fix: converted host configuration always use http as keystone protocol
This commit is contained in:
@@ -175,7 +175,7 @@ type SOpsLog struct {
|
||||
ObjType string `width:"40" charset:"ascii" nullable:"false" list:"user"` // = Column(VARCHAR(40, charset='ascii'), nullable=False)
|
||||
ObjId string `width:"128" charset:"ascii" nullable:"false" list:"user"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
|
||||
ObjName string `width:"128" charset:"utf8" nullable:"false" list:"user"` //= Column(VARCHAR(128, charset='utf8'), nullable=False)
|
||||
Action string `width:"32" charset:"ascii" nullable:"false" list:"user"` //= Column(VARCHAR(32, charset='ascii'), nullable=False)
|
||||
Action string `width:"32" charset:"utf8" nullable:"false" list:"user"` //= Column(VARCHAR(32, charset='ascii'), nullable=False)
|
||||
Notes string `width:"2048" charset:"utf8" list:"user"` // = Column(VARCHAR(2048, charset='utf8'))
|
||||
ProjectId string `name:"tenant_id" width:"128" charset:"ascii" list:"user"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'))
|
||||
Project string `name:"tenant" width:"128" charset:"utf8" list:"user"` // tenant = Column(VARCHAR(128, charset='utf8'))
|
||||
|
||||
@@ -310,9 +310,23 @@ func (self *SKVMHostDriver) PrepareConvert(host *models.SHost, image, raid strin
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
portStr := authLoc.Port()
|
||||
useSsl := ""
|
||||
if authLoc.Scheme == "https" {
|
||||
useSsl = "yes"
|
||||
if len(portStr) == 0 {
|
||||
portStr = "443"
|
||||
}
|
||||
} else {
|
||||
if len(portStr) == 0 {
|
||||
portStr = "80"
|
||||
}
|
||||
}
|
||||
authInfo := fmt.Sprintf("YUNION_REGION=%s\n", options.Options.Region)
|
||||
authInfo += fmt.Sprintf("YUNION_KEYSTONE=%s\n", options.Options.AuthURL)
|
||||
authInfo += fmt.Sprintf("YUNION_KEYSTONE_HOST=%s\n", authLoc.Hostname())
|
||||
authInfo += fmt.Sprintf("YUNION_KEYSTONE_PORT=%s\n", portStr)
|
||||
authInfo += fmt.Sprintf("YUNION_KEYSTONE_USE_SSL=%s\n", useSsl)
|
||||
authInfo += fmt.Sprintf("YUNION_HOST_NAME=%s\n", host.GetName())
|
||||
authInfo += fmt.Sprintf("YUNION_HOST_ADMIN=%s\n", options.Options.AdminUser)
|
||||
authInfo += fmt.Sprintf("YUNION_HOST_PASSWORD=%s\n", options.Options.AdminPassword)
|
||||
|
||||
Reference in New Issue
Block a user