New types
parent
269b608d4a
commit
25977d4697
226
types.go
226
types.go
|
@ -20,8 +20,8 @@ type Cephconnection struct {
|
||||||
|
|
||||||
type Poolinfo struct {
|
type Poolinfo struct {
|
||||||
Pool string `json:"pool,omitempty"`
|
Pool string `json:"pool,omitempty"`
|
||||||
PoolId int `json:"pool_id,omitempty"`
|
PoolId int64 `json:"pool_id,omitempty"`
|
||||||
Size int `json:"size,omitempty"`
|
Size int64 `json:"size,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (times *PlacementGroup) StringsToTimes() {
|
func (times *PlacementGroup) StringsToTimes() {
|
||||||
|
@ -43,28 +43,32 @@ func (times *PlacementGroup) StringsToTimes() {
|
||||||
times.LastScrubT, _ = time.Parse(LongForm, times.LastScrub)
|
times.LastScrubT, _ = time.Parse(LongForm, times.LastScrub)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Bucket struct {
|
||||||
|
Alg string `json:"alg"`
|
||||||
|
Hash string `json:"hash"`
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
Items []struct {
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
Pos int64 `json:"pos"`
|
||||||
|
Weight float64 `json:"weight"`
|
||||||
|
} `json:"items"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
TypeID int64 `json:"type_id"`
|
||||||
|
TypeName string `json:"type_name"`
|
||||||
|
Weight float64 `json:"weight"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Device struct {
|
||||||
|
Class string `json:"class"`
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
}
|
||||||
|
|
||||||
type OsdCrushDump struct {
|
type OsdCrushDump struct {
|
||||||
Buckets []struct {
|
Buckets []Bucket `json:"buckets"`
|
||||||
Alg string `json:"alg"`
|
|
||||||
Hash string `json:"hash"`
|
|
||||||
ID int64 `json:"id"`
|
|
||||||
Items []struct {
|
|
||||||
ID int64 `json:"id"`
|
|
||||||
Pos int64 `json:"pos"`
|
|
||||||
Weight int64 `json:"weight"`
|
|
||||||
} `json:"items"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
TypeID int64 `json:"type_id"`
|
|
||||||
TypeName string `json:"type_name"`
|
|
||||||
Weight int64 `json:"weight"`
|
|
||||||
} `json:"buckets"`
|
|
||||||
ChooseArgs struct{} `json:"choose_args"`
|
ChooseArgs struct{} `json:"choose_args"`
|
||||||
Devices []struct {
|
Devices []Device `json:"devices"`
|
||||||
Class string `json:"class"`
|
Rules []struct {
|
||||||
ID int64 `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
} `json:"devices"`
|
|
||||||
Rules []struct {
|
|
||||||
MaxSize int64 `json:"max_size"`
|
MaxSize int64 `json:"max_size"`
|
||||||
MinSize int64 `json:"min_size"`
|
MinSize int64 `json:"min_size"`
|
||||||
RuleID int64 `json:"rule_id"`
|
RuleID int64 `json:"rule_id"`
|
||||||
|
@ -108,67 +112,123 @@ type OsdCrushDump struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type OsdDump struct {
|
type OsdDump struct {
|
||||||
Buckets []struct {
|
BackfillfullRatio float64 `json:"backfillfull_ratio"`
|
||||||
Alg string `json:"alg"`
|
Blacklist struct{} `json:"blacklist"`
|
||||||
Hash string `json:"hash"`
|
ClusterSnapshot string `json:"cluster_snapshot"`
|
||||||
ID int64 `json:"id"`
|
Created string `json:"created"`
|
||||||
Items []struct {
|
CrushVersion int64 `json:"crush_version"`
|
||||||
ID int64 `json:"id"`
|
Epoch int64 `json:"epoch"`
|
||||||
Pos int64 `json:"pos"`
|
ErasureCodeProfiles struct {
|
||||||
Weight int64 `json:"weight"`
|
Default struct {
|
||||||
} `json:"items"`
|
K string `json:"k"`
|
||||||
Name string `json:"name"`
|
M string `json:"m"`
|
||||||
TypeID int64 `json:"type_id"`
|
Plugin string `json:"plugin"`
|
||||||
TypeName string `json:"type_name"`
|
Technique string `json:"technique"`
|
||||||
Weight int64 `json:"weight"`
|
} `json:"default"`
|
||||||
} `json:"buckets"`
|
} `json:"erasure_code_profiles"`
|
||||||
ChooseArgs struct{} `json:"choose_args"`
|
Flags string `json:"flags"`
|
||||||
Devices []struct {
|
FlagsNum int64 `json:"flags_num"`
|
||||||
Class string `json:"class"`
|
FlagsSet []string `json:"flags_set"`
|
||||||
ID int64 `json:"id"`
|
Fsid string `json:"fsid"`
|
||||||
Name string `json:"name"`
|
FullRatio float64 `json:"full_ratio"`
|
||||||
} `json:"devices"`
|
MaxOsd int64 `json:"max_osd"`
|
||||||
Rules []struct {
|
MinCompatClient string `json:"min_compat_client"`
|
||||||
MaxSize int64 `json:"max_size"`
|
Modified string `json:"modified"`
|
||||||
MinSize int64 `json:"min_size"`
|
NearfullRatio float64 `json:"nearfull_ratio"`
|
||||||
RuleID int64 `json:"rule_id"`
|
NewPurgedSnaps []interface{} `json:"new_purged_snaps"`
|
||||||
RuleName string `json:"rule_name"`
|
NewRemovedSnaps []interface{} `json:"new_removed_snaps"`
|
||||||
Ruleset int64 `json:"ruleset"`
|
OsdXinfo []struct {
|
||||||
Steps []struct {
|
DownStamp string `json:"down_stamp"`
|
||||||
Item int64 `json:"item"`
|
Features int64 `json:"features"`
|
||||||
ItemName string `json:"item_name"`
|
LaggyInterval int64 `json:"laggy_interval"`
|
||||||
Num int64 `json:"num"`
|
LaggyProbability float64 `json:"laggy_probability"`
|
||||||
Op string `json:"op"`
|
OldWeight float64 `json:"old_weight"`
|
||||||
Type string `json:"type"`
|
Osd int64 `json:"osd"`
|
||||||
} `json:"steps"`
|
} `json:"osd_xinfo"`
|
||||||
Type int64 `json:"type"`
|
Osds []struct {
|
||||||
} `json:"rules"`
|
ClusterAddr string `json:"cluster_addr"`
|
||||||
Tunables struct {
|
DownAt int64 `json:"down_at"`
|
||||||
AllowedBucketAlgs int64 `json:"allowed_bucket_algs"`
|
HeartbeatBackAddr string `json:"heartbeat_back_addr"`
|
||||||
ChooseLocalFallbackTries int64 `json:"choose_local_fallback_tries"`
|
HeartbeatFrontAddr string `json:"heartbeat_front_addr"`
|
||||||
ChooseLocalTries int64 `json:"choose_local_tries"`
|
In int64 `json:"in"`
|
||||||
ChooseTotalTries int64 `json:"choose_total_tries"`
|
LastCleanBegin int64 `json:"last_clean_begin"`
|
||||||
ChooseleafDescendOnce int64 `json:"chooseleaf_descend_once"`
|
LastCleanEnd int64 `json:"last_clean_end"`
|
||||||
ChooseleafStable int64 `json:"chooseleaf_stable"`
|
LostAt int64 `json:"lost_at"`
|
||||||
ChooseleafVaryR int64 `json:"chooseleaf_vary_r"`
|
Osd int64 `json:"osd"`
|
||||||
HasV2Rules int64 `json:"has_v2_rules"`
|
PrimaryAffinity float64 `json:"primary_affinity"`
|
||||||
HasV3Rules int64 `json:"has_v3_rules"`
|
PublicAddr string `json:"public_addr"`
|
||||||
HasV4Buckets int64 `json:"has_v4_buckets"`
|
State []string `json:"state"`
|
||||||
HasV5Rules int64 `json:"has_v5_rules"`
|
Up int64 `json:"up"`
|
||||||
LegacyTunables int64 `json:"legacy_tunables"`
|
UpFrom int64 `json:"up_from"`
|
||||||
MinimumRequiredVersion string `json:"minimum_required_version"`
|
UpThru int64 `json:"up_thru"`
|
||||||
OptimalTunables int64 `json:"optimal_tunables"`
|
UUID string `json:"uuid"`
|
||||||
Profile string `json:"profile"`
|
Weight float64 `json:"weight"`
|
||||||
RequireFeatureTunables int64 `json:"require_feature_tunables"`
|
} `json:"osds"`
|
||||||
RequireFeatureTunables2 int64 `json:"require_feature_tunables2"`
|
PgTemp []interface{} `json:"pg_temp"`
|
||||||
RequireFeatureTunables3 int64 `json:"require_feature_tunables3"`
|
PgUpmap []interface{} `json:"pg_upmap"`
|
||||||
RequireFeatureTunables5 int64 `json:"require_feature_tunables5"`
|
PgUpmapItems []interface{} `json:"pg_upmap_items"`
|
||||||
StrawCalcVersion int64 `json:"straw_calc_version"`
|
PoolMax int64 `json:"pool_max"`
|
||||||
} `json:"tunables"`
|
Pools []struct {
|
||||||
Types []struct {
|
ApplicationMetadata struct {
|
||||||
Name string `json:"name"`
|
Rbd struct{} `json:"rbd"`
|
||||||
TypeID int64 `json:"type_id"`
|
Rgw struct{} `json:"rgw"`
|
||||||
} `json:"types"`
|
} `json:"application_metadata"`
|
||||||
|
Auid int64 `json:"auid"`
|
||||||
|
CacheMinEvictAge int64 `json:"cache_min_evict_age"`
|
||||||
|
CacheMinFlushAge int64 `json:"cache_min_flush_age"`
|
||||||
|
CacheMode string `json:"cache_mode"`
|
||||||
|
CacheTargetDirtyHighRatioMicro int64 `json:"cache_target_dirty_high_ratio_micro"`
|
||||||
|
CacheTargetDirtyRatioMicro int64 `json:"cache_target_dirty_ratio_micro"`
|
||||||
|
CacheTargetFullRatioMicro int64 `json:"cache_target_full_ratio_micro"`
|
||||||
|
CreateTime string `json:"create_time"`
|
||||||
|
CrushRule int64 `json:"crush_rule"`
|
||||||
|
ErasureCodeProfile string `json:"erasure_code_profile"`
|
||||||
|
ExpectedNumObjects int64 `json:"expected_num_objects"`
|
||||||
|
FastRead bool `json:"fast_read"`
|
||||||
|
Flags int64 `json:"flags"`
|
||||||
|
FlagsNames string `json:"flags_names"`
|
||||||
|
GradeTable []interface{} `json:"grade_table"`
|
||||||
|
HitSetCount int64 `json:"hit_set_count"`
|
||||||
|
HitSetGradeDecayRate int64 `json:"hit_set_grade_decay_rate"`
|
||||||
|
HitSetParams struct {
|
||||||
|
Type string `json:"type"`
|
||||||
|
} `json:"hit_set_params"`
|
||||||
|
HitSetPeriod int64 `json:"hit_set_period"`
|
||||||
|
HitSetSearchLastN int64 `json:"hit_set_search_last_n"`
|
||||||
|
LastChange string `json:"last_change"`
|
||||||
|
LastForceOpResend string `json:"last_force_op_resend"`
|
||||||
|
LastForceOpResendPreluminous string `json:"last_force_op_resend_preluminous"`
|
||||||
|
MinReadRecencyForPromote int64 `json:"min_read_recency_for_promote"`
|
||||||
|
MinSize int64 `json:"min_size"`
|
||||||
|
MinWriteRecencyForPromote int64 `json:"min_write_recency_for_promote"`
|
||||||
|
ObjectHash int64 `json:"object_hash"`
|
||||||
|
Options struct{} `json:"options"`
|
||||||
|
PgNum int64 `json:"pg_num"`
|
||||||
|
PgPlacementNum int64 `json:"pg_placement_num"`
|
||||||
|
Pool int64 `json:"pool"`
|
||||||
|
PoolName string `json:"pool_name"`
|
||||||
|
PoolSnaps []interface{} `json:"pool_snaps"`
|
||||||
|
QuotaMaxBytes int64 `json:"quota_max_bytes"`
|
||||||
|
QuotaMaxObjects int64 `json:"quota_max_objects"`
|
||||||
|
ReadTier int64 `json:"read_tier"`
|
||||||
|
RemovedSnaps string `json:"removed_snaps"`
|
||||||
|
Size int64 `json:"size"`
|
||||||
|
SnapEpoch int64 `json:"snap_epoch"`
|
||||||
|
SnapMode string `json:"snap_mode"`
|
||||||
|
SnapSeq int64 `json:"snap_seq"`
|
||||||
|
StripeWidth int64 `json:"stripe_width"`
|
||||||
|
TargetMaxBytes int64 `json:"target_max_bytes"`
|
||||||
|
TargetMaxObjects int64 `json:"target_max_objects"`
|
||||||
|
TierOf int64 `json:"tier_of"`
|
||||||
|
Tiers []interface{} `json:"tiers"`
|
||||||
|
Type int64 `json:"type"`
|
||||||
|
UseGmtHitset bool `json:"use_gmt_hitset"`
|
||||||
|
WriteTier int64 `json:"write_tier"`
|
||||||
|
} `json:"pools"`
|
||||||
|
PrimaryTemp []interface{} `json:"primary_temp"`
|
||||||
|
RemovedSnapsQueue []interface{} `json:"removed_snaps_queue"`
|
||||||
|
RequireMinCompatClient string `json:"require_min_compat_client"`
|
||||||
|
RequireOsdRelease string `json:"require_osd_release"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlacementGroup struct {
|
type PlacementGroup struct {
|
||||||
|
|
Loading…
Reference in New Issue