Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data scratch - network profiles #1748

Closed
jan-goral opened this issue Mar 29, 2021 · 0 comments · Fixed by #1819
Closed

Data scratch - network profiles #1748

jan-goral opened this issue Mar 29, 2021 · 0 comments · Fixed by #1819

Comments

@jan-goral
Copy link
Contributor

Plan

According to the specification described in epic #1727
add abstraction and implementation for the following part of the data layer:

Abstraction

ftl/data/NetworkProfile.kt

package ftl.data

val fetchNetworkProfiles: NetworkProfile.Fetch get() = TODO()

data class NetworkProfile(
    val id: String,
    val downRule: Rule,
    val upRule: Rule
) {
    data class Rule(
        val bandwidth: String,
        val delay: String,
        val packetLossRatio: Float,
        val packetDuplicationRatio: Float,
        val burst: Float
    )

    interface Fetch : () -> List<NetworkProfile>
}

Target

  • ftl/environment/NetworkProfileDescription.kt

Adapter

ftl/adapter/GoogleNetworkProfileFetch.kt

@adamfilipow92 adamfilipow92 self-assigned this Apr 15, 2021
@mergify mergify bot closed this as completed in #1819 Apr 22, 2021
mergify bot pushed a commit that referenced this issue Apr 22, 2021
Fixes #1748 

## Test Plan
> How do we know the code works?

* Code is refactored according to the description in #1748 
* command flank network-profiles list runs without any problems

## Checklist

- [X] Unit tested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants