Skip to content

Commit d6bafce

Browse files
Merge pull request #686 from juanmanuel-tirado/JUJU-1361_upgrade_ubuntu_example_charm
Revision of test onos.charm
2 parents bd9490d + f101dd7 commit d6bafce

14 files changed

Lines changed: 315 additions & 976 deletions

File tree

examples/charms/onos.charm

3.85 MB
Binary file not shown.

examples/charms/ubuntu/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
venv/
2+
build/
3+
*.charm
4+
5+
.coverage
6+
__pycache__/
7+
*.py[cod]

examples/charms/ubuntu/.jujuignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/venv
2+
*.py[cod]
3+
*.charm
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ubuntu
2+
3+
## Developing
4+
5+
Create and activate a virtualenv with the development requirements:
6+
7+
virtualenv -p python3 venv
8+
source venv/bin/activate
9+
pip install -r requirements-dev.txt
10+
11+
## Code overview
12+
13+
TEMPLATE-TODO:
14+
One of the most important things a consumer of your charm (or library)
15+
needs to know is what set of functionality it provides. Which categories
16+
does it fit into? Which events do you listen to? Which libraries do you
17+
consume? Which ones do you export and how are they used?
18+
19+
## Intended use case
20+
21+
TEMPLATE-TODO:
22+
Why were these decisions made? What's the scope of your charm?
23+
24+
## Roadmap
25+
26+
If this Charm doesn't fulfill all of the initial functionality you were
27+
hoping for or planning on, please add a Roadmap or TODO here
28+
29+
## Testing
30+
31+
The Python operator framework includes a very nice harness for testing
32+
operator behaviour without full deployment. Just `run_tests`:
33+
34+
./run_tests

examples/charms/ubuntu/LICENSE

Lines changed: 202 additions & 674 deletions
Large diffs are not rendered by default.

examples/charms/ubuntu/README

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/charms/ubuntu/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ubuntu
2+
3+
## Description
4+
5+
A simple Ubuntu image for testing purposes.
6+
7+
## Usage
8+
9+
Nothing relevant simply to be deployed for testing.
10+
11+
12+
## Relations
13+
14+
NA.
15+
16+
## OCI Images
17+
18+
NA.
19+
20+
## Contributing
21+
22+
Please see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines
23+
on enhancements to this charm following best practice guidelines, and
24+
`CONTRIBUTING.md` for developer guidance.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2022 jtirado
2+
# See LICENSE file for licensing details.
3+
#
4+
# TEMPLATE-TODO: change this example to suit your needs.
5+
# If you don't need actions, you can remove the file entirely.
6+
# It ties in to the example _on_fortune_action handler in src/charm.py
7+
#
8+
# Learn more about actions at: https://juju.is/docs/sdk/actions
9+
10+
fortune:
11+
description: Returns a pithy phrase.
12+
params:
13+
fail:
14+
description: "Fail with this message"
15+
type: string
16+
default: ""
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Learn more about charmcraft.yaml configuration at:
2+
# https://juju.is/docs/sdk/charmcraft-config
3+
type: "charm"
4+
bases:
5+
- build-on:
6+
- name: "ubuntu"
7+
channel: "22.04"
8+
run-on:
9+
- name: "ubuntu"
10+
channel: "22.04"

examples/charms/ubuntu/config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
options: {}
1+
# Copyright 2022 jtirado
2+
# See LICENSE file for licensing details.
3+
#
4+
# Learn more about config at: https://juju.is/docs/sdk/config
5+
6+
options: {}

0 commit comments

Comments
 (0)