estbfirmware

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright 2025 Comcast Cable Communications Management, LLC

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.

SPDX-License-Identifier: Apache-2.0

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.

SPDX-License-Identifier: Apache-2.0

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.

SPDX-License-Identifier: Apache-2.0

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.

SPDX-License-Identifier: Apache-2.0

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.

SPDX-License-Identifier: Apache-2.0

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.

SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	DEFAULT_PREFIX     string = "XCONF"
	BOUNDS             int    = 5
	LAST_CONFIG_LOG_ID        = "0"
)
View Source
const (
	DATE_TIME_FORMATTER     = "1/2/2006 15:04"
	DATE_TIME_SEC_FORMATTER = "01/02/2006 15:04:05"
)
View Source
const (
	ID                               = "id"
	UPDATED                          = "updated"
	DESCRIPTION                      = "description"
	SUPPORTED_MODEL_IDS              = "supportedModelIds"
	FIRMWARE_DOWNLOAD_PROTOCOL       = "firmwareDownloadProtocol"
	FIRMWARE_FILENAME                = "firmwareFilename"
	FIRMWARE_LOCATION                = "firmwareLocation"
	FIRMWARE_VERSION                 = "firmwareVersion"
	IPV6_FIRMWARE_LOCATION           = "ipv6FirmwareLocation"
	UPGRADE_DELAY                    = "upgradeDelay"
	REBOOT_IMMEDIATELY               = "rebootImmediately"
	MANDATORY_UPDATE                 = "mandatoryUpdate"
	MAX_ALLOWED_NUMBER_OF_PROPERTIES = 20
)
View Source
const (
	/**
	 * RCDL indicates that the STB is capable of performing HTTP firmware downloads using DNS resolved URIs.
	 * The download will run in the eSTB. Until this, the eCM performed the download. eCM does not have
	 * DNS and thus requires an IP address.
	 * <p>
	 * Warning!!! Due to a bug in STB code, we have RNG150 boxes that send this parameter but they are NOT
	 * able to do HTTP firmware downloads. To handle this situation we are implementing a hack where
	 * RNG150 boxes will always be told to do TFTP. Once we are confident that all RNG150s have been updated
	 * to versions that actually do support HTTP, we will turn off the hack.
	 */
	RCDL Capabilities = "RCDL"
	/**
	 * lets Xconf know that reboot has been decoupled from firmware download. If not specified in the
	 * rebootImmediately response, the STB will still reboot immediately after firmware download.
	 */
	RebootDecoupled = "rebootDecoupled"
	RebootCoupled   = "rebootDecoupled"
	/**
	 * Lets Xconf know that the STB can accept a full URL for location rather than just an IP address or
	 * domain name.
	 */
	SupportsFullHttpUrl = "supportsFullHttpUrl"
)
View Source
const (
	PERCENT_FILTER_SINGLETON_ID     = "PERCENT_FILTER_VALUE"
	ROUND_ROBIN_FILTER_SINGLETON_ID = "DOWNLOAD_LOCATION_ROUND_ROBIN_FILTER_VALUE"
)

Variables

This section is empty.

Functions

func AddExpressionToIpRuleBean

func AddExpressionToIpRuleBean(ipRuleBean *sharedef.IpRuleBean)

func ConvertDownloadLocationFilterToFirmwareRule

func ConvertDownloadLocationFilterToFirmwareRule(filter *coreef.DownloadLocationFilter) (*corefw.FirmwareRule, error)

func ConvertFirmwareRuleToRebootFilter

func ConvertFirmwareRuleToRebootFilter(firmwareRule *corefw.FirmwareRule) *coreef.RebootImmediatelyFilter

func ConvertGlobalPercentageIntoRule

func ConvertGlobalPercentageIntoRule(globalpercentage *coreef.GlobalPercentage, applicationType string) *corefw.FirmwareRule

func ConvertMacRuleBeanToFirmwareRule

func ConvertMacRuleBeanToFirmwareRule(bean *coreef.MacRuleBean) *corefw.FirmwareRule

func ConvertModelRuleBeanToFirmwareRule

func ConvertModelRuleBeanToFirmwareRule(bean *coreef.EnvModelBean) *corefw.FirmwareRule

func ConvertRebootFilterToFirmwareRule

func ConvertRebootFilterToFirmwareRule(filter *coreef.RebootImmediatelyFilter) (*corefw.FirmwareRule, error)

func ConvertTimeFilterToFirmwareRule

func ConvertTimeFilterToFirmwareRule(timeFilter *coreef.TimeFilter) *corefw.FirmwareRule

func ConvertToListOfIpAddressGroups

func ConvertToListOfIpAddressGroups(genericLists []*shared.GenericNamespacedList) []*shared.IpAddressGroup

func CreateFirmwareConfigOneDB

func CreateFirmwareConfigOneDB(fc *FirmwareConfig) error

func DeleteOneFirmwareConfig

func DeleteOneFirmwareConfig(id string) error

func GetConfigChangeLogsOnly

func GetConfigChangeLogsOnly(mac string) []*sharedef.ConfigChangeLog

func GetCurrentId

func GetCurrentId(mac string) (string, error)

func GetFirmwareConfigAsMapDB

func GetFirmwareConfigAsMapDB(applicationType string) (configMap map[string]sharedef.FirmwareConfig, err error)

func GetFirmwareVersion

func GetFirmwareVersion(id string) string

func GetLastConfigLog

func GetLastConfigLog(mac string) *sharedef.ConfigChangeLog

func GetNormalizedMacAddresses

func GetNormalizedMacAddresses(macAddresses string) ([]string, error)

func GetRoundRobinIdByApplication

func GetRoundRobinIdByApplication(applicationType string) string

func HasProtocolSuffix

func HasProtocolSuffix(name string) bool

func IsLetter

func IsLetter(s string) bool

func IsLower

func IsLower(s string) bool

func IsRedundantEntry

func IsRedundantEntry(key string) bool

func MigrateIntoPercentageBean

func MigrateIntoPercentageBean(envModelPercentage *coreef.EnvModelPercentage, firmwareRule *corefw.FirmwareRule) *coreef.PercentageBean

func NewConfigChangeLogInf

func NewConfigChangeLogInf() interface{}

NewConfigChangeLogInf constructor

func NewEmptyPercentFilterWrapper

func NewEmptyPercentFilterWrapper() *coreef.PercentFilterWrapper

func NewEmptyRebootImmediatelyFilter

func NewEmptyRebootImmediatelyFilter() *coreef.RebootImmediatelyFilter

func NewEmptyTimeFilter

func NewEmptyTimeFilter() *corefw.TimeFilter

func NewFirmwareConfigInf

func NewFirmwareConfigInf() interface{}

NewFirmwareConfigInf constructor

func NewPercentFilterWrapper

func NewPercentFilterWrapper(percentFilterValue *coreef.PercentFilterValue, toHumanReadableForm bool) *coreef.PercentFilterWrapper

func NewSingletonFilterValueInf

func NewSingletonFilterValueInf() interface{}

func RebootImmediatelyFiltersByName

func RebootImmediatelyFiltersByName(applicationType string, name string) (*coreef.RebootImmediatelyFilter, error)

func SetConfigChangeLog

func SetConfigChangeLog(mac string, configChangeLog *ConfigChangeLog) error

func SetLastConfigLog

func SetLastConfigLog(mac string, configChangeLog *ConfigChangeLog) error

Types

type BseConfiguration

type BseConfiguration struct {
	Location string `json:"location"`

	Ipv6Location string `json:"ipv6Location"`

	Protocol string `json:"protocol"`

	ModelConfigurations []*ModelFirmwareConfiguration `json:"modelConfigurations"`
}

BseConfiguration ...

func (*BseConfiguration) ToString

func (b *BseConfiguration) ToString() string

ToString ...

type Capabilities

type Capabilities string

type ConfigChangeLog

type ConfigChangeLog struct {
	ID                 string                `json:"id,omitempty"`
	Updated            int64                 `json:"updated,omitempty"`
	Input              *ConvertedContext     `json:"input"`
	Rule               *RuleInfo             `json:"rule"`
	Filters            []*RuleInfo           `json:"filters"`
	Explanation        string                `json:"explanation,omitempty"`
	FirmwareConfig     *FirmwareConfigFacade `json:"config"`
	HasMinimumFirmware bool                  `json:"hasMinimumFirmware"`
}

ConfigChangeLog Logs2 table

func NewConfigChangeLog

func NewConfigChangeLog(convertedContext *ConvertedContext, explanation string, firmwareConfig *FirmwareConfigFacade, appliedFilters []interface{}, evaluatedRule *corefw.FirmwareRule, isLastLog bool) *ConfigChangeLog

type ConfigNames

type ConfigNames string

ConfigNames ...

type ConvertedContext

type ConvertedContext struct {
	Context             map[string]string   `json:"-"` // orignal Context
	EstbMac             string              `json:"estbMac,omitempty"`
	Env                 string              `json:"env,omitempty"`
	Model               string              `json:"model,omitempty"`
	FirmwareVersion     string              `json:"firmwareVersion,omitempty"`
	EcmMac              string              `json:"ecmMac,omitempty"`
	ReceiverId          string              `json:"receiverId,omitempty"`
	ControllerId        int64               `json:"controllerId,omitempty"`
	ChannelMapId        int64               `json:"channelMapId,omitempty"`
	VodId               int64               `json:"vodId,omitempty"`
	BypassFilters       map[string]struct{} `json:"-"`
	RawBypassFilters    []string            `json:"bypassFilters,omitempty"` // custom unmarshal for BypassFilters
	ForceFilters        map[string]struct{} `json:"-"`
	RawForceFilters     []string            `json:"forceFilters,omitempty"` // custom unmarshal for ForceFilters
	XconfHttpHeader     string              `json:"xconfHttpHeader,omitempty"`
	AccountId           string              `json:"accountId,omitempty"`
	Capabilities        []Capabilities      `json:"capabilities"`
	TimeZone            *time.Location      `json:"-"`
	RawTimeZone         string              `json:"timeZone"` // custom unmarshal for TimeZone
	Time                *time.Time          `json:"-"`
	RawTime             string              `json:"time"` // custom unmarshal for Time
	IpAddress           string              `json:"ipAddress,omitempty"`
	Rcdl                bool                `json:"rcdl"`
	SupportsFullHttpUrl bool                `json:"supportsFullHttpUrl"`
	RebootDecoupled     bool                `json:"rebootDecoupled"`
}

ConvertedContext ... convert the map string to type based context

func GetContextConverted

func GetContextConverted(ctx map[string]string) *ConvertedContext

func NewConvertedContext

func NewConvertedContext(ctx map[string]string) *ConvertedContext

NewConvertedContext ...

func (*ConvertedContext) AddBypassFiltersConverted

func (c *ConvertedContext) AddBypassFiltersConverted(bypassFilter string)

func (*ConvertedContext) AddForceFiltersConverted

func (c *ConvertedContext) AddForceFiltersConverted(forceFilter string)

func (*ConvertedContext) CreateCapabilitiesList

func (c *ConvertedContext) CreateCapabilitiesList() []Capabilities

func (*ConvertedContext) GetAccountHash

func (c *ConvertedContext) GetAccountHash() string

func (*ConvertedContext) GetAccountId

func (c *ConvertedContext) GetAccountId() string

func (*ConvertedContext) GetAccountIdConverted

func (c *ConvertedContext) GetAccountIdConverted() string

func (*ConvertedContext) GetBypassFilters

func (c *ConvertedContext) GetBypassFilters() string

func (*ConvertedContext) GetBypassFiltersConverted

func (c *ConvertedContext) GetBypassFiltersConverted() map[string]struct{}

func (*ConvertedContext) GetCapabilities

func (c *ConvertedContext) GetCapabilities() []string

func (*ConvertedContext) GetCapabilitiesConverted

func (c *ConvertedContext) GetCapabilitiesConverted() []Capabilities

func (*ConvertedContext) GetChannelMapId

func (c *ConvertedContext) GetChannelMapId() string

func (*ConvertedContext) GetChannelMapIdConverted

func (c *ConvertedContext) GetChannelMapIdConverted() int64

func (*ConvertedContext) GetControllerId

func (c *ConvertedContext) GetControllerId() string

func (*ConvertedContext) GetControllerIdConverted

func (c *ConvertedContext) GetControllerIdConverted() int64

func (*ConvertedContext) GetECMMac

func (c *ConvertedContext) GetECMMac() string

func (*ConvertedContext) GetEStbMac

func (c *ConvertedContext) GetEStbMac() string

func (*ConvertedContext) GetEcmMacConverted

func (c *ConvertedContext) GetEcmMacConverted() string

func (*ConvertedContext) GetEnv

func (c *ConvertedContext) GetEnv() string

func (*ConvertedContext) GetEnvConverted

func (c *ConvertedContext) GetEnvConverted() string

func (*ConvertedContext) GetEstbMacConverted

func (c *ConvertedContext) GetEstbMacConverted() string

func (*ConvertedContext) GetFirmwareVersion

func (c *ConvertedContext) GetFirmwareVersion() string

func (*ConvertedContext) GetFirmwareVersionConverted

func (c *ConvertedContext) GetFirmwareVersionConverted() string

func (*ConvertedContext) GetForceFilters

func (c *ConvertedContext) GetForceFilters() string

func (*ConvertedContext) GetForceFiltersConverted

func (c *ConvertedContext) GetForceFiltersConverted() map[string]struct{}

func (*ConvertedContext) GetIpAddress

func (c *ConvertedContext) GetIpAddress() string

func (*ConvertedContext) GetIpAddressConverted

func (c *ConvertedContext) GetIpAddressConverted() string

func (*ConvertedContext) GetModel

func (c *ConvertedContext) GetModel() string

func (*ConvertedContext) GetModelConverted

func (c *ConvertedContext) GetModelConverted() string

func (*ConvertedContext) GetPartnerId

func (c *ConvertedContext) GetPartnerId() string

func (*ConvertedContext) GetProperties

func (c *ConvertedContext) GetProperties() map[string]string

func (*ConvertedContext) GetRawTimeZoneConverted

func (c *ConvertedContext) GetRawTimeZoneConverted() string

func (*ConvertedContext) GetReceiverId

func (c *ConvertedContext) GetReceiverId() string

func (*ConvertedContext) GetReceiverIdConverted

func (c *ConvertedContext) GetReceiverIdConverted() string

func (*ConvertedContext) GetTime

func (c *ConvertedContext) GetTime() *time.Time

* * This is an optional parameter used mostly for testing to override actual * local time. This is always LOCAL time. We do NOT apply time zone offset * to this value. If time zone offset is sent, it is assumed to have already * been applied to this time.

func (*ConvertedContext) GetTimeConverted

func (c *ConvertedContext) GetTimeConverted() *time.Time

func (*ConvertedContext) GetTimeZone

func (c *ConvertedContext) GetTimeZone() string

* * Tells us the STB offset from UTC * http://joda-time.sourceforge.net/timezones.html Will be a string like * "-04:00". From this we can derive the SBT local time. * <p> * The normal case will be that "time" parameter is NOT sent and * "timeZoneOffset" parameter IS specified. In this case we will derive STB * local time from current UTC plus this offset. * <p> * For testing "time" parameter may be set. If it is set, it is assumed to * be local time, we do not apply time zone offset to it.

func (*ConvertedContext) GetTimeZoneConverted

func (c *ConvertedContext) GetTimeZoneConverted() *time.Location

func (*ConvertedContext) GetTimeZoneOffset

func (c *ConvertedContext) GetTimeZoneOffset() string

func (*ConvertedContext) GetVodId

func (c *ConvertedContext) GetVodId() string

func (*ConvertedContext) GetVodIdConverted

func (c *ConvertedContext) GetVodIdConverted() int64

func (*ConvertedContext) GetXconfHttpHeader

func (c *ConvertedContext) GetXconfHttpHeader() string

func (*ConvertedContext) GetXconfHttpHeaderConverted

func (c *ConvertedContext) GetXconfHttpHeaderConverted() string

func (*ConvertedContext) IsRcdl

func (c *ConvertedContext) IsRcdl() bool

func (*ConvertedContext) IsRebootDecoupled

func (c *ConvertedContext) IsRebootDecoupled() bool

func (*ConvertedContext) IsSupportsFullHttpUrl

func (c *ConvertedContext) IsSupportsFullHttpUrl() bool

func (*ConvertedContext) IsUTCConverted

func (c *ConvertedContext) IsUTCConverted() bool

func (*ConvertedContext) SetAccountHash

func (c *ConvertedContext) SetAccountHash(accountHash string)

func (*ConvertedContext) SetAccountId

func (c *ConvertedContext) SetAccountId(accountId string)

func (*ConvertedContext) SetAccountIdConverted

func (c *ConvertedContext) SetAccountIdConverted(accountId string)

func (*ConvertedContext) SetBypassFilters

func (c *ConvertedContext) SetBypassFilters(bypassFilters string)

func (*ConvertedContext) SetBypassFiltersConverted

func (c *ConvertedContext) SetBypassFiltersConverted(bypassFilters map[string]struct{})

func (*ConvertedContext) SetCapabilities

func (c *ConvertedContext) SetCapabilities(capabilities []string)

func (*ConvertedContext) SetCapabilitiesConverted

func (c *ConvertedContext) SetCapabilitiesConverted(capabilities []Capabilities)

func (*ConvertedContext) SetChannelMapId

func (c *ConvertedContext) SetChannelMapId(channelMapId string)

func (*ConvertedContext) SetChannelMapIdConverted

func (c *ConvertedContext) SetChannelMapIdConverted(channelMapId int64)

func (*ConvertedContext) SetControllerId

func (c *ConvertedContext) SetControllerId(controllerId string)

func (*ConvertedContext) SetControllerIdConverted

func (c *ConvertedContext) SetControllerIdConverted(controllerId int64)

func (*ConvertedContext) SetECMMac

func (c *ConvertedContext) SetECMMac(eCMMac string)

func (*ConvertedContext) SetEStbMac

func (c *ConvertedContext) SetEStbMac(eStbMac string)

func (*ConvertedContext) SetEcmMacConverted

func (c *ConvertedContext) SetEcmMacConverted(ecmMac string)

func (*ConvertedContext) SetEnv

func (c *ConvertedContext) SetEnv(env string)

func (*ConvertedContext) SetEnvConverted

func (c *ConvertedContext) SetEnvConverted(env string)

func (*ConvertedContext) SetEstbMacConverted

func (c *ConvertedContext) SetEstbMacConverted(estbMac string)

func (*ConvertedContext) SetFirmwareVersion

func (c *ConvertedContext) SetFirmwareVersion(firmwareVersion string)

func (*ConvertedContext) SetFirmwareVersionConverted

func (c *ConvertedContext) SetFirmwareVersionConverted(firmwareVersion string)

func (*ConvertedContext) SetForceFilters

func (c *ConvertedContext) SetForceFilters(forceFilters string)

func (*ConvertedContext) SetForceFiltersConverted

func (c *ConvertedContext) SetForceFiltersConverted(forceFilters map[string]struct{})

func (*ConvertedContext) SetIpAddress

func (c *ConvertedContext) SetIpAddress(ipAddress string)

func (*ConvertedContext) SetIpAddressConverted

func (c *ConvertedContext) SetIpAddressConverted(ipAddress string)

func (*ConvertedContext) SetModel

func (c *ConvertedContext) SetModel(model string)

func (*ConvertedContext) SetModelConverted

func (c *ConvertedContext) SetModelConverted(model string)

func (*ConvertedContext) SetPartnerId

func (c *ConvertedContext) SetPartnerId(partnerId string)

func (*ConvertedContext) SetReceiverId

func (c *ConvertedContext) SetReceiverId(receiverId string)

func (*ConvertedContext) SetReceiverIdConverted

func (c *ConvertedContext) SetReceiverIdConverted(receiverId string)

func (*ConvertedContext) SetTime

func (c *ConvertedContext) SetTime(t time.Time)

func (*ConvertedContext) SetTimeConverted

func (c *ConvertedContext) SetTimeConverted(t *time.Time)

func (*ConvertedContext) SetTimeZone

func (c *ConvertedContext) SetTimeZone(tz string)

func (*ConvertedContext) SetTimeZoneConverted

func (c *ConvertedContext) SetTimeZoneConverted(timeZone *time.Location)

func (*ConvertedContext) SetTimeZoneOffset

func (c *ConvertedContext) SetTimeZoneOffset(timeZoneOffset string)

func (*ConvertedContext) SetVodId

func (c *ConvertedContext) SetVodId(vodId string)

func (*ConvertedContext) SetVodIdConverted

func (c *ConvertedContext) SetVodIdConverted(vodId int64)

func (*ConvertedContext) SetXconfHttpHeader

func (c *ConvertedContext) SetXconfHttpHeader(xconfHttpHeader string)

func (*ConvertedContext) SetXconfHttpHeaderConverted

func (c *ConvertedContext) SetXconfHttpHeaderConverted(xconfHttpHeader string)

func (*ConvertedContext) ToString

func (c *ConvertedContext) ToString() string

func (*ConvertedContext) UnmarshalJSON

func (cc *ConvertedContext) UnmarshalJSON(bytes []byte) error

type EnvModelPercentage

type EnvModelPercentage struct {
	Percentage            float64                `json:"percentage"`
	Active                bool                   `json:"active"`
	FirmwareCheckRequired bool                   `json:"firmwareCheckRequired"`
	RebootImmediately     bool                   `json:"rebootImmediately"`
	LastKnownGood         string                 `json:"lastKnownGood"`
	IntermediateVersion   string                 `json:"intermediateVersion"`
	Whitelist             *shared.IpAddressGroup `json:"whitelist,omitempty"`
	FirmwareVersions      []string               `json:"firmwareVersions"`
	Name                  string                 `json:"name,omitempty"` // Only used as part of response for REST API
}

type Expression

type Expression struct {
	TargetedModelIds []string               `json:"targetedModelIds"`
	EnvironmentId    string                 `json:"environmentId,omitempty"`
	ModelId          string                 `json:"modelId,omitempty"`
	IpAddressGroup   *shared.IpAddressGroup `json:"ipAddressGroup,omitempty"`
}

type FirmwareConfig

type FirmwareConfig struct {
	ID                       string            `json:"id"`
	Updated                  int64             `json:"updated,omitempty"`
	Description              string            `json:"description"`
	SupportedModelIds        []string          `json:"supportedModelIds"`
	FirmwareFilename         string            `json:"firmwareFilename"`
	FirmwareVersion          string            `json:"firmwareVersion"`
	ApplicationType          string            `json:"applicationType,omitempty"`
	FirmwareDownloadProtocol string            `json:"firmwareDownloadProtocol,omitempty"`
	FirmwareLocation         string            `json:"firmwareLocation,omitempty"`
	Ipv6FirmwareLocation     string            `json:"ipv6FirmwareLocation,omitempty"`
	UpgradeDelay             int64             `json:"upgradeDelay,omitempty"`
	RebootImmediately        bool              `json:"rebootImmediately"`
	MandatoryUpdate          bool              `json:"-"`
	Properties               map[string]string `json:"properties,omitempty"`
}

FirmwareConfig table

func GetFirmwareConfigAsListDB

func GetFirmwareConfigAsListDB() ([]*FirmwareConfig, error)

func GetFirmwareConfigOneDB

func GetFirmwareConfigOneDB(id string) (*FirmwareConfig, error)

func NewEmptyFirmwareConfig

func NewEmptyFirmwareConfig() *FirmwareConfig

func NewFirmwareConfigFromMap

func NewFirmwareConfigFromMap(dataMap map[string]interface{}) *FirmwareConfig

func (*FirmwareConfig) Clone

func (obj *FirmwareConfig) Clone() (*FirmwareConfig, error)

func (*FirmwareConfig) CreateFirmwareConfigResponse

func (fc *FirmwareConfig) CreateFirmwareConfigResponse() *FirmwareConfigResponse

func (*FirmwareConfig) GetApplicationType

func (obj *FirmwareConfig) GetApplicationType() string

func (*FirmwareConfig) SetApplicationType

func (obj *FirmwareConfig) SetApplicationType(appType string)

func (*FirmwareConfig) ToFirmwareConfigResponseMap

func (fc *FirmwareConfig) ToFirmwareConfigResponseMap() map[string]interface{}

func (*FirmwareConfig) ToPropertiesMap

func (fc *FirmwareConfig) ToPropertiesMap() map[string]interface{}

func (*FirmwareConfig) Validate

func (obj *FirmwareConfig) Validate() error

func (*FirmwareConfig) ValidateName

func (obj *FirmwareConfig) ValidateName() error

type FirmwareConfigFacade

type FirmwareConfigFacade struct {
	Properties       map[string]interface{}
	CustomProperties map[string]string
}

FirmwareConfigFacade ...

func NewDefaulttFirmwareConfigFacade

func NewDefaulttFirmwareConfigFacade() *FirmwareConfigFacade

NewFirmwareConfigFacade ...

func NewFirmwareConfigFacade

func NewFirmwareConfigFacade(firmwareConfig *FirmwareConfig) *FirmwareConfigFacade

func NewFirmwareConfigFacadeEmptyProperties

func NewFirmwareConfigFacadeEmptyProperties() *FirmwareConfigFacade

NewEmptyFirmwareConfigFacade ...

func (*FirmwareConfigFacade) GetFirmwareDownloadProtocol

func (ff *FirmwareConfigFacade) GetFirmwareDownloadProtocol() string

GetFirmwareDownloadProtocol ...

func (*FirmwareConfigFacade) GetFirmwareFilename

func (ff *FirmwareConfigFacade) GetFirmwareFilename() string

func (*FirmwareConfigFacade) GetFirmwareLocation

func (ff *FirmwareConfigFacade) GetFirmwareLocation() string

func (*FirmwareConfigFacade) GetFirmwareVersion

func (ff *FirmwareConfigFacade) GetFirmwareVersion() string

func (*FirmwareConfigFacade) GetIpv6FirmwareLocation

func (ff *FirmwareConfigFacade) GetIpv6FirmwareLocation() string

func (*FirmwareConfigFacade) GetRebootImmediately

func (ff *FirmwareConfigFacade) GetRebootImmediately() bool

func (*FirmwareConfigFacade) GetStringValue

func (ff *FirmwareConfigFacade) GetStringValue(key string) string

func (*FirmwareConfigFacade) GetUpgradeDelay

func (ff *FirmwareConfigFacade) GetUpgradeDelay() int

func (*FirmwareConfigFacade) GetValue

func (ff *FirmwareConfigFacade) GetValue(key string) interface{}

func (*FirmwareConfigFacade) MarshalJSON

func (fcf *FirmwareConfigFacade) MarshalJSON() ([]byte, error)

func (*FirmwareConfigFacade) PutAll

func (ff *FirmwareConfigFacade) PutAll(nmap map[string]interface{})

func (*FirmwareConfigFacade) PutIfPresent

func (ff *FirmwareConfigFacade) PutIfPresent(key string, value interface{})

func (*FirmwareConfigFacade) SetFirmwareDownloadProtocol

func (ff *FirmwareConfigFacade) SetFirmwareDownloadProtocol(protocol string)

SetFirmwareDownloadProtocol ...

func (*FirmwareConfigFacade) SetFirmwareLocation

func (ff *FirmwareConfigFacade) SetFirmwareLocation(location string)

func (*FirmwareConfigFacade) SetRebootImmediately

func (ff *FirmwareConfigFacade) SetRebootImmediately(flag bool)

func (*FirmwareConfigFacade) SetStringValue

func (ff *FirmwareConfigFacade) SetStringValue(key string, value string)

func (*FirmwareConfigFacade) UnmarshalJSON

func (fcf *FirmwareConfigFacade) UnmarshalJSON(bytes []byte) error

type FirmwareConfigFacadeResponse

type FirmwareConfigFacadeResponse map[string]interface{}

func CreateFirmwareConfigFacadeResponse

func CreateFirmwareConfigFacadeResponse(firmwareConfigFacade FirmwareConfigFacade) FirmwareConfigFacadeResponse

type FirmwareConfigForMacRuleBeanResponse

type FirmwareConfigForMacRuleBeanResponse struct {
	ID                       string            `json:"id"`
	Updated                  int64             `json:"updated,omitempty"`
	Description              string            `json:"description"`
	SupportedModelIds        []string          `json:"supportedModelIds"`
	FirmwareFilename         string            `json:"firmwareFilename"`
	FirmwareVersion          string            `json:"firmwareVersion"`
	ApplicationType          string            `json:"applicationType,omitempty"`
	FirmwareDownloadProtocol string            `json:"firmwareDownloadProtocol,omitempty"`
	FirmwareLocation         string            `json:"firmwareLocation,omitempty"`
	Ipv6FirmwareLocation     string            `json:"ipv6FirmwareLocation,omitempty"`
	UpgradeDelay             int64             `json:"upgradeDelay,omitempty"`
	RebootImmediately        bool              `json:"rebootImmediately,omitempty"`
	MandatoryUpdate          bool              `json:"-"`
	Properties               map[string]string `json:"properties,omitempty"`
}

func FirmwareConfigToFirmwareConfigForMacRuleBeanResponse

func FirmwareConfigToFirmwareConfigForMacRuleBeanResponse(firmwareConfig *FirmwareConfig) *FirmwareConfigForMacRuleBeanResponse

type FirmwareConfigResponse

type FirmwareConfigResponse struct {
	ID                string            `json:"id"`
	Description       string            `json:"description,omitempty"`
	SupportedModelIds []string          `json:"supportedModelIds,omitempty"`
	FirmwareFilename  string            `json:"firmwareFilename,omitempty"`
	FirmwareVersion   string            `json:"firmwareVersion,omitempty"`
	Properties        map[string]string `json:"properties,omitempty"`
}

type IpFilter

type IpFilter struct {
	Id             string                 `json:"id" xml:"id"`
	Name           string                 `json:"name" xml:"name"`
	IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup" xml:"ipAddressGroup"`
	Warehouse      bool                   `json:"warehouse" xml:"warehouse"`
}

func NewEmptyIpFilter

func NewEmptyIpFilter() *IpFilter

func (*IpFilter) IsWarehouse

func (i *IpFilter) IsWarehouse() bool

*

  • Quick and dirty way to tell if this filter is tied to a warehouse or not.
  • If it is we don't want to allow editing/deleting

type IpRuleBean

type IpRuleBean struct {
	Id             string                 `json:"id"`
	FirmwareConfig *FirmwareConfig        `json:"firmwareConfig"`
	Name           string                 `json:"name"`
	IpAddressGroup *shared.IpAddressGroup `json:"ipAddressGroup"`
	EnvironmentId  string                 `json:"environmentId"`
	ModelId        string                 `json:"modelId"`
	Expression     *Expression            `json:"expression"`
	Noop           bool                   `json:"noop"`
}

IpRuleBean ...

type MacRuleBean

type MacRuleBean struct {
	Id               string          `json:"id,omitempty"`
	Name             string          `json:"name,omitempty"`
	MacAddresses     string          `json:"macAddresses,omitempty"`
	MacListRef       string          `json:"macListRef,omitempty"`
	FirmwareConfig   *FirmwareConfig `json:"firmwareConfig"`
	TargetedModelIds *[]string       `json:"targetedModelIds,omitempty"`
	//in JAva, MacList is in MacRuleBeanWrapper that extends MacRuleBean
	MacList *[]string `json:"-"`
}

MacRuleBean ...

type MacRuleBeanResponse

type MacRuleBeanResponse struct {
	Id               string                                `json:"id,omitempty"`
	Name             string                                `json:"name,omitempty"`
	MacAddresses     string                                `json:"macAddresses,omitempty"`
	MacListRef       string                                `json:"macListRef,omitempty"`
	FirmwareConfig   *FirmwareConfigForMacRuleBeanResponse `json:"firmwareConfig"`
	TargetedModelIds *[]string                             `json:"targetedModelIds,omitempty"`
	MacList          *[]string                             `json:"macList,omitempty"`
}

func MacRuleBeanToMacRuleBeanResponse

func MacRuleBeanToMacRuleBeanResponse(macRuleBean *MacRuleBean) *MacRuleBeanResponse

type MinimumFirmwareCheckBean

type MinimumFirmwareCheckBean struct {
	HasMinimumFirmware bool `json:"hasMinimumFirmware"`
}

MinimumFirmwareCheckBean ...

type ModelFirmwareConfiguration

type ModelFirmwareConfiguration struct {
	Model            string `json:"model"`
	FirmwareFilename string `json:"firmwareFilename"`
	FirmwareVersion  string `json:"firmwareVersion"`
}

ModelFirmwareConfiguration ...

func NewModelFirmwareConfiguration

func NewModelFirmwareConfiguration(model string, firmwareFilename string, firmwareVersion string) *ModelFirmwareConfiguration

NewModelFirmwareConfiguration ... new model config struct

func (*ModelFirmwareConfiguration) ToString

func (m *ModelFirmwareConfiguration) ToString() string

type PercentFilterValue

type PercentFilterValue struct {
	ID                  string                        `json:"id"`
	Updated             int64                         `json:"updated"`
	Type                SingletonFilterClass          `json:"type"`
	Whitelist           *shared.IpAddressGroup        `json:"whitelist"`
	Percentage          float64                       `json:"percentage"`
	Percent             int                           `json:"percent"`
	EnvModelPercentages map[string]EnvModelPercentage `json:"envModelPercentages"`
}

type PercentageBean

type PercentageBean struct {
	ID                     string                `json:"id"`
	Name                   string                `json:"name,omitempty"`
	Whitelist              string                `json:"whitelist,omitempty"`
	Active                 bool                  `json:"active"`
	FirmwareCheckRequired  bool                  `json:"firmwareCheckRequired"`
	RebootImmediately      bool                  `json:"rebootImmediately"`
	LastKnownGood          string                `json:"lastKnownGood,omitempty"`
	IntermediateVersion    string                `json:"intermediateVersion,omitempty"`
	FirmwareVersions       []string              `json:"firmwareVersions"`
	Distributions          []*corefw.ConfigEntry `json:"distributions"`
	ApplicationType        string                `json:"applicationType,omitempty"`
	Environment            string                `json:"environment,omitempty"`
	Model                  string                `json:"model,omitempty"`
	OptionalConditions     *re.Rule              `json:"optionalConditions,omitempty"`
	UseAccountIdPercentage bool                  `json:"useAccountIdPercentage"`
}

type RuleInfo

type RuleInfo struct {
	ID       string `json:"id,omitempty"`
	Type     string `json:"type,omitempty"`
	Name     string `json:"name,omitempty"`
	NoOp     bool   `json:"noop"`
	Blocking bool   `json:"blocking,omitempty"`
}

RuleInfo ...

func NewRuleInfo

func NewRuleInfo(filterOrRule interface{}) *RuleInfo

type SingletonFilterClass

type SingletonFilterClass string
const (
	PercentFilterClass        SingletonFilterClass = "com.comcast.xconf.estbfirmware.PercentFilterValue"
	PercentFilterWrapperClass SingletonFilterClass = "com.comcast.xconf.queries.beans.PercentFilterWrapper"
	RoundRobinFilterClass     SingletonFilterClass = "com.comcast.xconf.estbfirmware.DownloadLocationRoundRobinFilterValue"
)

type SingletonFilterValue

type SingletonFilterValue struct {
	ID                                    string                                        `json:"id"`
	PercentFilterValue                    *PercentFilterValue                           `json:"-"`
	DownloadLocationRoundRobinFilterValue *coreef.DownloadLocationRoundRobinFilterValue `json:"-"`
}

SingletonFilterValue table - this struct serves as a container for the two subtypes

func (*SingletonFilterValue) Clone

func (*SingletonFilterValue) IsDownloadLocationRoundRobinFilterValue

func (sfv *SingletonFilterValue) IsDownloadLocationRoundRobinFilterValue() bool

func (*SingletonFilterValue) IsPercentFilterValue

func (sfv *SingletonFilterValue) IsPercentFilterValue() bool

func (*SingletonFilterValue) MarshalJSON

func (sfv *SingletonFilterValue) MarshalJSON() ([]byte, error)

MarshalJSON custom marshal to handle different subclass of SingletonFilterValue

func (*SingletonFilterValue) UnmarshalJSON

func (sfv *SingletonFilterValue) UnmarshalJSON(bytes []byte) error

// UnmarshalJSON custom unmarshal to handle different subclass of SingletonFilterValue

Jump to

Keyboard shortcuts

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