legacyinventory

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package legacyinventory includes gerrit-related functions. This is a TEMP package to mitigate crbug.com/1011236 & b/142340801. Mostly duplicated from crosskylabadmin, will delete it after inventory V2 is launched.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeURL

func ChangeURL(changeNumber int) (string, error)

ChangeURL returns a URL to the gerrit change with given changeNumber.

Types

type C

type C struct {
	// contains filtered or unexported fields
}

C includes clients required for inventory changes.

func CreateC

func CreateC(hc *http.Client) (*C, error)

CreateC creates an inventory client with gerrit & gitiles clients.

func (*C) AbandonChange

func (c *C) AbandonChange(ctx context.Context, ci *gerrit.ChangeInfo) error

AbandonChange abandon the change to gerrit.

func (*C) CreateChange

func (c *C) CreateChange(ctx context.Context, subject string) (*gerrit.ChangeInfo, error)

CreateChange creates a gerrit change.

func (*C) MakeDeleteHostChange

func (c *C) MakeDeleteHostChange(ctx context.Context, changeInfo *gerrit.ChangeInfo, host string) error

MakeDeleteHostChange edit CL by deleting the inventory file of a given host.

func (*C) SubmitChange

func (c *C) SubmitChange(ctx context.Context, changeInfo *gerrit.ChangeInfo) error

SubmitChange submit the change to gerrit.

Jump to

Keyboard shortcuts

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