Commit 8d2e7c23 authored by Mark Beierl's avatar Mark Beierl
Browse files

Merge branch 'cherry-pick-74517831' into 'v9.0'

Virtual PC for Hackfest

See merge request !130
parents 6f202ff8 42660e4a
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
# Descriptor created by OSM descriptor package generated

**Created on 02/18/2021, 05:51:56 **
 No newline at end of file
+37 −0
Original line number Diff line number Diff line
# Copyright 2019 ETSI OSM
#
# All Rights Reserved.
#
#    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.
nsd:
  nsd:
  - description: Virtual Desktop Computer with Xubuntu Desktop and RDP
    designer: OSM
    df:
    - id: default-df
      vnf-profile:
      - id: '1'
        virtual-link-connectivity:
        - constituent-cpd-id:
          - constituent-base-element-id: '1'
            constituent-cpd-id: virtual-pc-mgmt-ext
          virtual-link-profile-id: mgmtnet
        vnfd-id: virtual-pc_vnfd
    id: hackfest_virtual-pc_nsd
    name: hackfest_virtual-pc_nsd
    version: '1.0'
    virtual-link-desc:
    - id: mgmtnet
      mgmt-network: 'true'
    vnfd-id:
    - virtual-pc_vnfd
+3 −0
Original line number Diff line number Diff line
/venv
*.py[cod]
*.charm
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

+55 −0
Original line number Diff line number Diff line
# virtual-pc

## Description


## Usage

### Prepare the environment

```bash
sudo snap install juju --classic --channel 2.8/stable
sudo snap install lxd
lxd.init
juju bootstrap lxd
juju add-model test-virtual-pc
```

### Deploy (from the Store)

```bash
juju deploy cs:~charmed-osm/virtual-pc --channel edge
```

### Deploy (locally)

Build the charm:

```bash
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements-dev.txt
pip install charmcraft
./venv/bin/charmcraft build
```

Deploy:

```bash
juju deploy ./virtual-pc.charm
```

## Developing

Create and activate a virtualenv with the development requirements:

    virtualenv -p python3 venv
    source venv/bin/activate
    pip install -r requirements-dev.txt

## Testing

The Python operator framework includes a very nice harness for testing
operator behaviour without full deployment. Just `run_tests`:

    ./run_tests
Loading