myquery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Copyright 2022 Red Hat, Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.

Index

Constants

This section is empty.

Variables

View Source
var ComponentStages map[string][]bson.E
View Source
var Data = []struct {
	OSP             string
	Deployments     int32
	Percentage      float64
	PercentageTotal float64
}{}
View Source
var DepInfo map[string]string
View Source
var Deployments []Deployment
View Source
var MyFilter bson.A
View Source
var UniqueDepsLen int

Functions

func FilterCollections

func FilterCollections(Components []string) ([]bson.E, []bson.E)

func FilterVersions

func FilterVersions(coll *mongo.Collection, deploymentIdPipeline primitive.A) (message string)

func FilterVersionsPerComp

func FilterVersionsPerComp(coll *mongo.Collection, thePipeline primitive.A) (message string)

func GenerateTable

func GenerateTable(title string, rows [][]string, headers []string) string

func GetUserInfo

func GetUserInfo()

Display login screen and get user info.

func GetVersion

func GetVersion(dep Deployment) string

func NewFilter

func NewFilter(coll *mongo.Collection, deploymentIdPipeline primitive.A) (int32, float32)

func PrependStage

func PrependStage(gatherVersions primitive.A) primitive.A

func PrintResults

func PrintResults(coll *mongo.Collection, filterComponents primitive.D, opts *options.FindOptions)

Types

type Calculations

type Calculations struct {
	Deployments int32
	Percentage  float32
}
var Manila Calculations

type Cephfs

type Cephfs struct {
	Driver string `json:"share_driver,omitempty"`
}

type CinderBackEnd

type CinderBackEnd struct {
	Driver string `json:"volume_driver,omitempty"`
}

type CinderConf

type CinderConf struct {
	DatabaseKey       DBKey         `json:"database,omitempty"`
	Default           DefaultCinder `json:"default,omitempty"`
	KeyManager        KeyManagerkey `json:"key_manager,omitempty"`
	KeystoneAuthToken KeystoneAuth  `json:"keystone_authtoken,omitempty"`
	NovaKey           Nova          `json:"nova,omitempty"`
	TripleoNFS        TripleoNFSKey `json:"tripleo_nfs,omitempty"`
	UploadDate        string        `json:"up_data_date,omitempty"`
	Driver            []string      `json:"up_cinder_volume_drivers,omitempty"`
	BackendName       CinderBackEnd
}

type CinderDriversKey

type CinderDriversKey struct {
	Drivers []string
}

type Count

type Count struct {
	AllReportsWithVersion int32
	AllUniqueDeployments  int32
	AllReports            int64
}
var Numbers Count

type DBKey

type DBKey struct {
	Connection string `json:"connection,omitempty"`
	MaxRetries string `json:"db_max_retries,omitempty"`
}

type DefaultCinder

type DefaultCinder struct {
	VolumeType         string `json:"default_volume_type,omitempty"`
	EnabledV3api       string `json:"enable_v3_api,omitempty"`
	EnabledBackends    string `json:"enabled_backends,omitempty"`
	OSApiVolumeWorkers string `json:"osapi_volume_workers,omitempty"`
	StoraAvailZone     string `json:"storage_availability_zone,omitempty"`
}

type DefaultGlance

type DefaultGlance struct {
	GlanceDrivers string `json:"enabled_backends,omitempty"`
}

type DefaultManila

type DefaultManila struct {
	Backends string `json:"enabled_share_backends,omitempty"`
}

type Deployment

type Deployment struct {
	ID            string     `json:"_id,omitempty"`
	AccountNumber string     `json:"account_number,omitempty"`
	CinderConf    CinderConf `json:"cinder_conf,omitempty"`
	ManilaConf    ManilaConf `json:"manila_conf,omitempty"`
	DeploymentID  string     `json:"deployment_id,omitempty"`
	Versions      Vhistory   `json:"versions_history,omitempty"`
	GlanceConf    GlanceConf `json:"glance_api_conf,omitempty"`
}

type GlanceConf

type GlanceConf struct {
	Default DefaultGlance `json:"default,omitempty"`
}

type KeyManagerkey

type KeyManagerkey struct {
	Backend string `json:"backend,omitempty"`
}

type KeystoneAuth

type KeystoneAuth struct {
	AuthType          string
	AuthUri           string
	ProjectDomainName string
	ProjectName       string
	UserDomainName    string
	Username          string
}

type ManilaConf

type ManilaConf struct {
	Default DefaultManila `json:"default,omitempty"`
	Cephfs  Cephfs        `json:"cephfs,omitempty"`
}

type MyDataBase

type MyDataBase struct {
	MyClient *mongo.Client
	Coll     *mongo.Collection
}

func (*MyDataBase) CreateClient

func (m *MyDataBase) CreateClient() *MyDataBase

This function creates a client for accessing a MongoDB database.

type Nova

type Nova struct {
	AuthType          string
	AuthUrl           string
	Interface         string
	ProjectDomainName string
	ProjectName       string
	UserDomainName    string
	Username          string
}

type OctaviaWorker

type OctaviaWorker struct {
	Time   string
	Number int
}

type OspVer

type OspVer struct {
	OSP10   string `json:"10,omitempty"`
	OSP13   string `json:"13,omitempty"`
	OSP161  string `json:"16.1,omitempty"`
	OSP16_2 string `json:"16.2,omitempty"`
	OSP17   string `json:"17,omitempty"`
}

type TripleoNFSKey

type TripleoNFSKey struct {
	BackEndHost              string
	NasSecureFileOperations  bool
	NasSecureFilePermissions bool
	BFSMountOptions          []string
	NFSnapshotSupport        bool
	VolumeBackendName        string
	VolumeDriver             string
}

type UserInfo

type UserInfo struct {
	Name string
	Pass string
}
var User UserInfo

type Vhistory

type Vhistory struct {
	OSPv OspVer `json:"osp_ver,omitempty"`
}

Jump to

Keyboard shortcuts

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