aakaas

package
v1.180.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 10 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,
}

Functions

This section is empty.

Types

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