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) SetMaxRuntime(maxRuntime time.Duration)
- type AakBundleMockNewMC
- type AakUtils
- 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 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,
}
Functions ¶
This section is empty.
Types ¶
type AakBundle ¶
type AakBundle struct { *command.Command *piperhttp.Client // contains filtered or unexported fields }
func (*AakBundle) GetMaxRuntime ¶
func (*AakBundle) GetPollingInterval ¶
func (*AakBundle) ReadAddonDescriptor ¶
func (bundle *AakBundle) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
type AakBundleMock ¶
type AakBundleMock struct { *mock.ExecMockRunner *abaputils.ClientMock // contains filtered or unexported fields }
func NewAakBundleMock ¶
func NewAakBundleMock() *AakBundleMock
func (*AakBundleMock) GetMaxRuntime ¶
func (bundle *AakBundleMock) GetMaxRuntime() time.Duration
func (*AakBundleMock) GetPollingInterval ¶
func (bundle *AakBundleMock) GetPollingInterval() time.Duration
func (*AakBundleMock) GetUtils ¶
func (bundle *AakBundleMock) GetUtils() AakUtils
func (*AakBundleMock) ReadAddonDescriptor ¶
func (bundle *AakBundleMock) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
func (*AakBundleMock) SetBody ¶
func (bundle *AakBundleMock) SetBody(body string)
func (*AakBundleMock) SetBodyList ¶
func (bundle *AakBundleMock) SetBodyList(bodyList []string)
func (*AakBundleMock) SetError ¶
func (bundle *AakBundleMock) SetError(errorText string)
func (*AakBundleMock) SetMaxRuntime ¶
func (bundle *AakBundleMock) SetMaxRuntime(maxRuntime time.Duration)
type AakBundleMockNewMC ¶
type AakBundleMockNewMC struct { *mock.ExecMockRunner *abapbuild.MockClient // contains filtered or unexported fields }
*****************************other client mock *******************************
func NewAakBundleMockNewMC ¶
func NewAakBundleMockNewMC(mC *abapbuild.MockClient) *AakBundleMockNewMC
func (*AakBundleMockNewMC) GetMaxRuntime ¶
func (bundle *AakBundleMockNewMC) GetMaxRuntime() time.Duration
func (*AakBundleMockNewMC) GetPollingInterval ¶
func (bundle *AakBundleMockNewMC) GetPollingInterval() time.Duration
func (*AakBundleMockNewMC) GetUtils ¶
func (bundle *AakBundleMockNewMC) GetUtils() AakUtils
func (*AakBundleMockNewMC) ReadAddonDescriptor ¶
func (bundle *AakBundleMockNewMC) ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error)
type AakUtils ¶
type AakUtils interface { command.ExecRunner abapbuild.HTTPSendLoader ReadAddonDescriptor(FileName string) (abaputils.AddonDescriptor, error) GetMaxRuntime() time.Duration GetPollingInterval() time.Duration }
func NewAakBundle ¶
func NewAakBundle() AakUtils
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 TargetVector ¶
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 ¶
func (tv *TargetVector) CreateTargetVector(conn *abapbuild.Connector) error
CreateTargetVector : Initial Creation of an TargetVector
func (*TargetVector) GetTargetVector ¶
func (tv *TargetVector) GetTargetVector(conn *abapbuild.Connector) error
GetTargetVector : Read details of the TargetVector
func (*TargetVector) InitExisting ¶
func (tv *TargetVector) InitExisting(ID string)
InitExisting : Initialize an already in AAKaaS existing TargetVector
func (*TargetVector) InitNew ¶
func (tv *TargetVector) InitNew(addonDescriptor *abaputils.AddonDescriptor) error
Init : Initialize TargetVector for Creation in AAKaaS
func (*TargetVector) PollForStatus ¶
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 ¶
func (tv *TargetVector) PublishTargetVector(conn *abapbuild.Connector, targetVectorScope TargetVectorStatus) error
type TargetVectorCV ¶
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 ¶
type TargetVectorCVs struct {
TargetVectorCVs []TargetVectorCV `json:"results"`
}
TargetVectorCVs : deployable states of the software Component Versions of the product version
type TargetVectorStatus ¶
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" )