Skip to content

Commit

Permalink
first working version for openslo v1 and native sumologic slos
Browse files Browse the repository at this point in the history
Took 11 hours 55 minutes
  • Loading branch information
agaurav committed Jun 10, 2022
1 parent 153a924 commit 63e02a2
Show file tree
Hide file tree
Showing 40 changed files with 894 additions and 484 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### [v0.7](https://github.com/SumoLogic-Labs/slogen/milestone/2?closed=1)
### [v0.7](https://github.com/OpenSLO/slogen/milestone/2?closed=1)

- **Feature** : Timeslice based budgeting (availability calculated w.r.t. good time windows)
- [Sample config](samples/openslo/ingest-lag-timeslice-budgeting.yaml)
Expand Down
2 changes: 1 addition & 1 deletion cmd/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd

import (
"fmt"
"github.com/SumoLogic-Labs/slogen/libs"
"github.com/OpenSLO/slogen/libs"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd

import (
"fmt"
"github.com/SumoLogic-Labs/slogen/libs"
"github.com/OpenSLO/slogen/libs"
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd

import (
"fmt"
"github.com/SumoLogic-Labs/slogen/libs"
"github.com/OpenSLO/slogen/libs"

"github.com/spf13/cobra"
)
Expand Down
10 changes: 7 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd

import (
"fmt"
"github.com/SumoLogic-Labs/slogen/libs"
"github.com/OpenSLO/slogen/libs"
"github.com/fatih/color"
"github.com/spf13/cobra"
"os"
Expand Down Expand Up @@ -62,9 +62,13 @@ One or more config or directory containing configs can be given as arg. Doesn't
color.HiCyan("\nignoring errors\n")
}

var slos map[string]*libs.SLO
slos := make(map[string]*libs.SLOMultiVerse)

for _, path := range args {
slos, _ = libs.ParseDir(path, c.IgnoreError)
err = libs.ParseDir(path, c.IgnoreError, slos)
if err != nil {
libs.BadResult("\nerror parsing out dir : %s\n", err.Error())
}
}

path, err := libs.GenTerraform(slos, *c)
Expand Down
5 changes: 3 additions & 2 deletions cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
package cmd

import (
"github.com/SumoLogic-Labs/slogen/libs"
"github.com/OpenSLO/slogen/libs"
"github.com/fatih/color"
"github.com/spf13/cobra"
"strings"
Expand Down Expand Up @@ -53,8 +53,9 @@ to quickly create a Cobra application.`,
color.HiCyan("ignoring errors")
}

sloMap := make(map[string]*libs.SLOMultiVerse)
for _, path := range args {
libs.ParseDir(path, ie)
libs.ParseDir(path, ie, sloMap)
}
},
}
Expand Down
2 changes: 1 addition & 1 deletion credits/LIST.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### List of OSS projects used along with thier licesning for the given version

```
github.com/SumoLogic-Labs/slogen,Unknown,Apache-2.0
github.com/OpenSLO/slogen,Unknown,Apache-2.0
github.com/hashicorp/go-uuid,https://github.com/hashicorp/go-uuid/blob/master/LICENSE,MPL-2.0
github.com/bgentry/go-netrc/netrc,https://github.com/bgentry/go-netrc/blob/master/netrc/LICENSE,MIT
github.com/klauspost/compress/internal/snapref,https://github.com/klauspost/compress/blob/master/internal/snapref/LICENSE,BSD-3-Clause
Expand Down
92 changes: 35 additions & 57 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,76 +1,54 @@
module github.com/SumoLogic-Labs/slogen
module github.com/OpenSLO/slogen

go 1.17
go 1.18

require (
github.com/OpenSLO/oslo v0.3.2
github.com/OpenSLO/oslo v0.3.3-0.20220517200710-52adf8831ad9
github.com/fatih/color v1.13.0
github.com/go-resty/resty/v2 v2.6.0
github.com/hashicorp/terraform-exec v0.14.0
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-colorable v0.1.11
github.com/go-resty/resty/v2 v2.7.0
github.com/hashicorp/go-version v1.5.0
github.com/hashicorp/hc-install v0.3.2
github.com/hashicorp/terraform-exec v0.16.1
github.com/kr/pretty v0.3.0
github.com/manifoldco/promptui v0.9.0
github.com/mattn/go-colorable v0.1.12
github.com/mitchellh/hashstructure/v2 v2.0.2
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.9.0
go.uber.org/zap v1.19.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
github.com/spf13/cobra v1.4.0
github.com/spf13/viper v1.12.0
go.uber.org/zap v1.21.0
gopkg.in/yaml.v3 v3.0.1
)

require (
cloud.google.com/go v0.97.0 // indirect
cloud.google.com/go/storage v1.17.0 // indirect
github.com/aws/aws-sdk-go v1.40.53 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/chzyer/readline v1.5.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.5.8 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-version v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/terraform-json v0.12.0 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
go.opencensus.io v0.23.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20211001092434-39dca1131b70 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect
golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/api v0.58.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210930144712-2e2e1008e8a3 // indirect
google.golang.org/grpc v1.41.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

replace github.com/OpenSLO/oslo => github.com/agaurav/oslo v0.3.3-0.20220610112509-8297ce344784
Loading

0 comments on commit 63e02a2

Please sign in to comment.