Documentation ¶
Index ¶
- Variables
- type AakBundle
- type AakBundleMock
- func (bundle *AakBundleMock) GetMaxRuntime() time.Duration
- func (bundle *AakBundleMock) GetPollingInterval() time.Duration
- func (bundle *AakBundleMock) GetUtils() AakUtils
- func (bundle *AakBundleMock) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
- func (bundle *AakBundleMock) SetBody(body string)
- func (bundle *AakBundleMock) SetBodyList(bodyList []string)
- func (bundle *AakBundleMock) SetError(errorText string)
- func (bundle *AakBundleMock) SetErrorInsteadOfDumpToTrue()
- func (bundle *AakBundleMock) SetMaxRuntime(maxRuntime time.Duration)
- type AakBundleMockNewMC
- type AakUtils
- type ComponentVersion
- type Package
- func (p *Package) ChangeStatus(initialRepo *abaputils.Repository)
- func (p *Package) CopyFieldsToRepo(initialRepo *abaputils.Repository)
- func (p *Package) GetPackageAndNamespace() error
- func (p *Package) InitPackage(repo abaputils.Repository, conn abapbuild.Connector)
- func (p *Package) Register() error
- func (p *Package) Release() error
- func (p *Package) ReserveNext() error
- type PackageStatus
- type PackageWithRepository
- type ProductVersion
- type TargetVector
- func (tv *TargetVector) CreateTargetVector(conn *abapbuild.Connector) error
- func (tv *TargetVector) GetTargetVector(conn *abapbuild.Connector) error
- func (tv *TargetVector) InitExisting(ID string)
- func (tv *TargetVector) InitNew(addonDescriptor *abaputils.AddonDescriptor) error
- func (tv *TargetVector) PollForStatus(conn *abapbuild.Connector, targetStatus TargetVectorStatus) error
- func (tv *TargetVector) PublishTargetVector(conn *abapbuild.Connector, targetVectorScope TargetVectorStatus) error
- type TargetVectorCV
- type TargetVectorCVs
- type TargetVectorStatus
Constants ¶
This section is empty.
Variables ¶
var AAKaaSGetTVPublishProdSuccess = abapbuild.MockData{
Method: `GET`,
Url: `/odata/aas_ocs_package/TargetVectorSet('W7Q00207512600000353')`,
Body: `{
"d": {
"Id": "W7Q00207512600000353",
"Vendor": "0000029218",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "P",
"PublishStatus": "S"
}
}`,
StatusCode: 200,
}
var AAKaaSGetTVPublishRunning = abapbuild.MockData{
Method: `GET`,
Url: `/odata/aas_ocs_package/TargetVectorSet('W7Q00207512600000353')`,
Body: `{
"d": {
"Id": "W7Q00207512600000353",
"Vendor": "0000029218",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "G",
"PublishStatus": "R"
}
}`,
StatusCode: 200,
}
var AAKaaSGetTVPublishTestSuccess = abapbuild.MockData{
Method: `GET`,
Url: `/odata/aas_ocs_package/TargetVectorSet('W7Q00207512600000353')`,
Body: `{
"d": {
"Id": "W7Q00207512600000353",
"Vendor": "0000029218",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "T",
"PublishStatus": "S"
}
}`,
StatusCode: 200,
}
var AAKaaSHead = abapbuild.MockData{ Method: `HEAD`, Url: `/odata/aas_ocs_package`, Body: `<?xml version="1.0"?> <HTTP_BODY/>`, StatusCode: 200, Header: http.Header{"x-csrf-token": {"HRfJP0OhB9C9mHs2RRqUzw=="}}, }
var AAKaaSTVCreatePost = abapbuild.MockData{
Method: `POST`,
Url: `/odata/aas_ocs_package/TargetVectorSet`,
Body: `{
"d": {
"Id": "W7Q00207512600000262",
"Vendor": "0000203069",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "G",
"Content": {
"results": [
{
"Id": "W7Q00207512600000262",
"ScName": "/DRNMSPC/COMP01",
"ScVersion": "0001",
"DeliveryPackage": "SAPK-001AAINDRNMSPC",
"SpLevel": "0000",
"PatchLevel": "0000"
}
]
}
}
}`,
StatusCode: 200,
}
var AAKaaSTVPublishProdPost = abapbuild.MockData{
Method: `POST`,
Url: `/odata/aas_ocs_package/PublishTargetVector?Id='W7Q00207512600000353'&Scope='P'`,
Body: `{
"d": {
"Id": "W7Q00207512600000353",
"Vendor": "0000029218",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "G",
"PublishStatus": "R"
}
}`,
StatusCode: 200,
}
var AAKaaSTVPublishTestPost = abapbuild.MockData{
Method: `POST`,
Url: `/odata/aas_ocs_package/PublishTargetVector?Id='W7Q00207512600000353'&Scope='T'`,
Body: `{
"d": {
"Id": "W7Q00207512600000353",
"Vendor": "0000029218",
"ProductName": "/DRNMSPC/PRD01",
"ProductVersion": "0001",
"SpsLevel": "0000",
"PatchLevel": "0000",
"Status": "G",
"PublishStatus": "R"
}
}`,
StatusCode: 200,
}
var ResponseCheckCVs = `` /* 186-byte string literal not displayed */
var ResponseCheckPV = `` /* 186-byte string literal not displayed */
Functions ¶
This section is empty.
Types ¶
type AakBundle ¶ added in v1.185.0
type AakBundle struct { *command.Command *piperhttp.Client *piperutils.Files // contains filtered or unexported fields }
func (*AakBundle) GetMaxRuntime ¶ added in v1.185.0
func (*AakBundle) GetPollingInterval ¶ added in v1.185.0
func (*AakBundle) ReadAddonDescriptor ¶ added in v1.185.0
func (bundle *AakBundle) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
type AakBundleMock ¶ added in v1.185.0
type AakBundleMock struct { *mock.ExecMockRunner *abaputils.ClientMock *mock.FilesMock // contains filtered or unexported fields }
func NewAakBundleMock ¶ added in v1.185.0
func NewAakBundleMock() *AakBundleMock
func (*AakBundleMock) GetMaxRuntime ¶ added in v1.185.0
func (bundle *AakBundleMock) GetMaxRuntime() time.Duration
func (*AakBundleMock) GetPollingInterval ¶ added in v1.185.0
func (bundle *AakBundleMock) GetPollingInterval() time.Duration
func (*AakBundleMock) GetUtils ¶ added in v1.185.0
func (bundle *AakBundleMock) GetUtils() AakUtils
func (*AakBundleMock) ReadAddonDescriptor ¶ added in v1.185.0
func (bundle *AakBundleMock) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
func (*AakBundleMock) SetBody ¶ added in v1.185.0
func (bundle *AakBundleMock) SetBody(body string)
func (*AakBundleMock) SetBodyList ¶ added in v1.185.0
func (bundle *AakBundleMock) SetBodyList(bodyList []string)
func (*AakBundleMock) SetError ¶ added in v1.185.0
func (bundle *AakBundleMock) SetError(errorText string)
func (*AakBundleMock) SetErrorInsteadOfDumpToTrue ¶ added in v1.241.0
func (bundle *AakBundleMock) SetErrorInsteadOfDumpToTrue()
func (*AakBundleMock) SetMaxRuntime ¶ added in v1.185.0
func (bundle *AakBundleMock) SetMaxRuntime(maxRuntime time.Duration)
type AakBundleMockNewMC ¶ added in v1.185.0
type AakBundleMockNewMC struct { *mock.ExecMockRunner *abapbuild.MockClient *piperutils.Files // contains filtered or unexported fields }
*****************************other client mock *******************************
func NewAakBundleMockNewMC ¶ added in v1.185.0
func NewAakBundleMockNewMC(mC *abapbuild.MockClient) *AakBundleMockNewMC
func (*AakBundleMockNewMC) GetMaxRuntime ¶ added in v1.185.0
func (bundle *AakBundleMockNewMC) GetMaxRuntime() time.Duration
func (*AakBundleMockNewMC) GetPollingInterval ¶ added in v1.185.0
func (bundle *AakBundleMockNewMC) GetPollingInterval() time.Duration
func (*AakBundleMockNewMC) GetUtils ¶ added in v1.185.0
func (bundle *AakBundleMockNewMC) GetUtils() AakUtils
func (*AakBundleMockNewMC) ReadAddonDescriptor ¶ added in v1.185.0
func (bundle *AakBundleMockNewMC) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
type AakUtils ¶ added in v1.185.0
type AakUtils interface { command.ExecRunner abapbuild.HTTPSendLoader piperutils.FileUtils ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error) GetMaxRuntime() time.Duration GetPollingInterval() time.Duration }
func NewAakBundle ¶ added in v1.185.0
func NewAakBundle() AakUtils
type ComponentVersion ¶ added in v1.266.0
type ComponentVersion struct {
// contains filtered or unexported fields
}
func (*ComponentVersion) ConstructComponentVersion ¶ added in v1.266.0
func (c *ComponentVersion) ConstructComponentVersion(repo abaputils.Repository, conn abapbuild.Connector) error
func (*ComponentVersion) CopyVersionFieldsToRepo ¶ added in v1.266.0
func (c *ComponentVersion) CopyVersionFieldsToRepo(repo *abaputils.Repository)
func (*ComponentVersion) Validate ¶ added in v1.266.0
func (c *ComponentVersion) Validate() error
type Package ¶
type Package struct { abapbuild.Connector ComponentName string VersionYAML string PackageName string `json:"Name"` Type string `json:"Type"` PredecessorCommitID string `json:"PredecessorCommitId"` CommitID string `json:"CommitId"` Status PackageStatus `json:"Status"` Namespace string `json:"Namespace"` }
Package : ABAP delivery package
func (*Package) ChangeStatus ¶
func (p *Package) ChangeStatus(initialRepo *abaputils.Repository)
ChangeStatus : change status of the package in the repository
func (*Package) CopyFieldsToRepo ¶
func (p *Package) CopyFieldsToRepo(initialRepo *abaputils.Repository)
CopyFieldsToRepo : copy package attributes to the repository
func (*Package) GetPackageAndNamespace ¶
GetPackageAndNamespace : retrieve attributes of the package from AAKaaS
func (*Package) InitPackage ¶
func (p *Package) InitPackage(repo abaputils.Repository, conn abapbuild.Connector)
InitPackage : initialize package attributes from the repository
func (*Package) ReserveNext ¶
ReserveNext : reserve next delivery package for this software component version
type PackageStatus ¶
type PackageStatus string
PackageStatus : Status of an ABAP delivery package
const ( // PackageStatusPlanned : Package is Planned PackageStatusPlanned PackageStatus = "P" // PackageStatusLocked : Package is Locked PackageStatusLocked PackageStatus = "L" // PackageStatusReleased : Package is Released PackageStatusReleased PackageStatus = "R" // PackageStatusCreationTriggered : Package was Released but Release procedure is not yet finished PackageStatusCreationTriggered PackageStatus = "C" )
type PackageWithRepository ¶
type PackageWithRepository struct { Package Package Repo abaputils.Repository }
PackageWithRepository : pack'n repo
type ProductVersion ¶ added in v1.266.0
type ProductVersion struct {
// contains filtered or unexported fields
}
func (*ProductVersion) ConstructProductversion ¶ added in v1.266.0
func (p *ProductVersion) ConstructProductversion(desc abaputils.AddonDescriptor, conn abapbuild.Connector) error
func (*ProductVersion) CopyVersionFieldsToDescriptor ¶ added in v1.266.0
func (p *ProductVersion) CopyVersionFieldsToDescriptor(desc *abaputils.AddonDescriptor)
func (*ProductVersion) ValidateAndResolveVersionFields ¶ added in v1.266.0
func (p *ProductVersion) ValidateAndResolveVersionFields() error
type TargetVector ¶ added in v1.178.0
type TargetVector struct { ID string `json:"Id"` ProductName string `json:"ProductName"` ProductVersion string `json:"ProductVersion"` SpsLevel string `json:"SpsLevel"` PatchLevel string `json:"PatchLevel"` Status string `json:"Status"` PublishStatus string `json:"PublishStatus"` Content TargetVectorCVs `json:"Content"` }
TargetVector : TargetVector desribes a deployble state of an ABAP product version
func (*TargetVector) CreateTargetVector ¶ added in v1.178.0
func (tv *TargetVector) CreateTargetVector(conn *abapbuild.Connector) error
CreateTargetVector : Initial Creation of an TargetVector
func (*TargetVector) GetTargetVector ¶ added in v1.178.0
func (tv *TargetVector) GetTargetVector(conn *abapbuild.Connector) error
GetTargetVector : Read details of the TargetVector
func (*TargetVector) InitExisting ¶ added in v1.178.0
func (tv *TargetVector) InitExisting(ID string)
InitExisting : Initialize an already in AAKaaS existing TargetVector
func (*TargetVector) InitNew ¶ added in v1.178.0
func (tv *TargetVector) InitNew(addonDescriptor *abaputils.AddonDescriptor) error
Init : Initialize TargetVector for Creation in AAKaaS
func (*TargetVector) PollForStatus ¶ added in v1.178.0
func (tv *TargetVector) PollForStatus(conn *abapbuild.Connector, targetStatus TargetVectorStatus) error
PollForStatus : Poll AAKaaS until final PublishStatus reached and check if desired Status was reached
func (*TargetVector) PublishTargetVector ¶ added in v1.178.0
func (tv *TargetVector) PublishTargetVector(conn *abapbuild.Connector, targetVectorScope TargetVectorStatus) error
type TargetVectorCV ¶ added in v1.178.0
type TargetVectorCV struct { ID string `json:"Id"` ScName string `json:"ScName"` ScVersion string `json:"ScVersion"` DeliveryPackage string `json:"DeliveryPackage"` SpLevel string `json:"SpLevel"` PatchLevel string `json:"PatchLevel"` }
TargetVectorCV : deployable state of an software Component Version as part of an TargetVector
type TargetVectorCVs ¶ added in v1.178.0
type TargetVectorCVs struct {
TargetVectorCVs []TargetVectorCV `json:"results"`
}
TargetVectorCVs : deployable states of the software Component Versions of the product version
type TargetVectorStatus ¶ added in v1.178.0
type TargetVectorStatus string
TargetVectorStatus : Status of TargetVector in AAKaaS
const ( // TargetVectorStatusGenerated : TargetVector is Generated (not published yet) TargetVectorStatusGenerated TargetVectorStatus = "G" // TargetVectorStatusTest : TargetVector is published for testing TargetVectorStatusTest TargetVectorStatus = "T" // TargetVectorStatusProductive : TargetVector is published for productive use TargetVectorStatusProductive TargetVectorStatus = "P" TargetVectorPublishStatusRunning TargetVectorStatus = "R" TargetVectorPublishStatusSuccess TargetVectorStatus = "S" TargetVectorPublishStatusError TargetVectorStatus = "E" )