aakaas

package
v1.360.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
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,
}
View Source
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,
}
View Source
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,
}
View Source
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=="}},
}
View Source
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,
}
View Source
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,
}
View Source
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,
}
View Source
var ResponseCheck = `` /* 766-byte string literal not displayed */
View Source
var ResponseCheckCVs = `` /* 186-byte string literal not displayed */
View Source
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 (bundle *AakBundle) GetMaxRuntime() time.Duration

func (*AakBundle) GetPollingInterval added in v1.185.0

func (bundle *AakBundle) GetPollingInterval() time.Duration

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

	MockAddonDescriptor abaputils.AddonDescriptor
	// 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

func NewAakBundleWithTime added in v1.185.0

func NewAakBundleWithTime(maxRuntime time.Duration, pollingInterval time.Duration) 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

func (p *Package) GetPackageAndNamespace() error

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) Register

func (p *Package) Register() error

Register : register package in AAKaaS

func (*Package) Release

func (p *Package) Release() error

Release : release package in AAKaaS

func (*Package) ReserveNext

func (p *Package) ReserveNext() error

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 ProductVersionContent added in v1.359.0

type ProductVersionContent struct {
	ProductName                      string
	SemanticProductVersion           string `json:"SemProductVersion"`
	SoftwareComponentName            string `json:"ScName"`
	SemanticSoftwareComponentVersion string `json:"SemScVersion"`
	SoftwareComponentVersion         string `json:"ScVersion"`
	SpLevel                          string
	PatchLevel                       string
	Vendor                           string
	VendorType                       string
}

type ProductVersionContents added in v1.359.0

type ProductVersionContents struct {
	Content []ProductVersionContent `json:"results"`
}

type ProductVersionHeader added in v1.359.0

type ProductVersionHeader struct {
	ProductName            string
	SemanticProductVersion string `json:"SemProductVersion"`
	ProductVersion         string
	SpsLevel               string
	PatchLevel             string
	Vendor                 string
	VendorType             string
	Content                []ProductVersionContent `json:"-"`       //for developer access
	JsonContent            ProductVersionContents  `json:"Content"` //for json (Un)Marshaling
}

func NewProductVersionHeader added in v1.359.0

func NewProductVersionHeader(addonDescriptor *abaputils.AddonDescriptor, conn *abapbuild.Connector) (*ProductVersionHeader, error)

func (*ProductVersionHeader) CheckAndResolveVersion added in v1.359.0

func (pv *ProductVersionHeader) CheckAndResolveVersion(conn *abapbuild.Connector) error

func (*ProductVersionHeader) SyncAddonDescriptorVersionFields added in v1.359.0

func (pv *ProductVersionHeader) SyncAddonDescriptorVersionFields(addonDescriptor *abaputils.AddonDescriptor) 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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL