Merge pull request #8 from 0xFelix/rename

Rename collection to kubevirt.core
This commit is contained in:
kubevirt-bot
2023-08-03 13:11:28 +02:00
committed by GitHub
18 changed files with 46 additions and 46 deletions

View File

@@ -13,11 +13,11 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/kubernetes/kubevirt
path: ansible_collections/kubevirt/core
fetch-depth: 0
- run: |
mkdir -p /home/runner/.kube/
cp -rp ${GITHUB_WORKSPACE}/ansible_collections/kubernetes/kubevirt/tests/.kubeconfig /home/runner/.kube/config
cp -rp ${GITHUB_WORKSPACE}/ansible_collections/kubevirt/core/tests/.kubeconfig /home/runner/.kube/config
cat /home/runner/.kube/config
sanity:
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main

View File

@@ -16,7 +16,7 @@ env:
jobs:
docs:
runs-on: ubuntu-latest
if: github.repository == 'kubevirt/kubernetes.kubevirt'
if: github.repository == 'kubevirt/kubevirt.core'
permissions:
actions: write
checks: write
@@ -28,7 +28,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/kubernetes/kubevirt
path: ansible_collections/kubevirt/core
fetch-depth: 0
- name: Set up Python
@@ -40,9 +40,9 @@ jobs:
- name: Install doc dependencies
run: |
python -m pip install --upgrade pip
pip install -r ansible_collections/kubernetes/kubevirt/docs/requirements.txt
pip install -r ansible_collections/kubernetes/kubevirt/requirements.txt
ansible-galaxy collection install -r ansible_collections/kubernetes/kubevirt/requirements.yml -p /home/runner/.ansible/collections --force-with-deps
pip install -r ansible_collections/kubevirt/core/docs/requirements.txt
pip install -r ansible_collections/kubevirt/core/requirements.txt
ansible-galaxy collection install -r ansible_collections/kubevirt/core/requirements.yml -p /home/runner/.ansible/collections --force-with-deps
sudo apt install -y sed hub
- name: Create default collection path
@@ -53,12 +53,12 @@ jobs:
- name: Create changelog and documentation
uses: ansible-middleware/collection-docs-action@main
with:
collection_fqcn: kubernetes.kubevirt
collection_repo: kubevirt/kubernetes.kubevirt
collection_fqcn: kubevirt.core
collection_repo: kubevirt/kubevirt.core
dependencies: false
commit_changelog: false
commit_ghpages: true
changelog_release: false
generate_docs: true
path: /home/runner/.ansible/collections/ansible_collections/kubernetes/kubevirt
path: /home/runner/.ansible/collections/ansible_collections/kubevirt/core
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -6,7 +6,7 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'kubevirt/kubernetes.kubevirt'
if: github.repository == 'kubevirt/kubevirt.core'
permissions:
actions: write
checks: write
@@ -58,8 +58,8 @@ jobs:
- name: Create changelog and documentation
uses: ansible-middleware/collection-docs-action@main
with:
collection_fqcn: kubernetes.kubevirt
collection_repo: kubevirt/kubernetes.kubevirt
collection_fqcn: kubevirt.core
collection_repo: kubevirt/kubevirt.core
dependencies: false
commit_changelog: true
commit_ghpages: false

View File

@@ -1,9 +1,9 @@
# Lean Ansible bindings for KubeVirt
<!-- Add CI and code coverage badges here. Samples included below. -->
[![CI](https://github.com/kubevirt/kubernetes.kubevirt/workflows/CI/badge.svg?event=push)](https://github.com/kubevirt/kubernetes.kubevirt/actions)
[![CI](https://github.com/kubevirt/kubevirt.core/workflows/CI/badge.svg?event=push)](https://github.com/kubevirt/kubevirt.core/actions)
<!-- Describe the collection and why a user would want to use it. What does the collection do? -->
This repo hosts the kubernetes.kubevirt Ansible Collection.
This repo hosts the kubevirt.core Ansible Collection.
The collection includes an inventory plugin for Ansible to automate the management of VMs running on KubeVirt.
@@ -89,25 +89,25 @@ Python libraries:
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
```bash
ansible-galaxy collection install kubernetes.kubevirt
ansible-galaxy collection install kubevirt.core
```
You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
```yaml
---
collections:
- name: kubernetes.kubevirt
- name: kubevirt.core
```
Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the `ansible` package. To upgrade the collection to the latest available version, run the following command:
```bash
ansible-galaxy collection install kubernetes.kubevirt --upgrade
ansible-galaxy collection install kubevirt.core --upgrade
```
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version `0.1.0`:
```bash
ansible-galaxy collection install kubernetes.kubevirt:==0.1.0
ansible-galaxy collection install kubevirt.core:==0.1.0
```
See [Ansible Using collections](https://docs.ansible.com/ansible/devel/user_guide/collections_using.html) for more details.

View File

@@ -1,4 +1,4 @@
.. Red Hat kubernetes kubevirt Ansible Collection documentation main file
.. Red Hat kubevirt core Ansible Collection documentation main file
Welcome to Kubevirt Collection documentation
=======================================

View File

@@ -1,4 +1,4 @@
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- default

View File

@@ -1,4 +1,4 @@
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- default

View File

@@ -1,7 +1,7 @@
- hosts: localhost
tasks:
- name: Create VM
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
state: present
name: testvm-with-dv
namespace: default

View File

@@ -1,7 +1,7 @@
- hosts: localhost
tasks:
- name: Create VM
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
state: present
name: testvm
namespace: default

View File

@@ -1,7 +1,7 @@
- hosts: localhost
tasks:
- name: Create VM
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
state: present
name: testvm
namespace: default

View File

@@ -1,7 +1,7 @@
- hosts: localhost
tasks:
- name: Delete VM
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
name: testvm-with-dv
namespace: default
state: absent

View File

@@ -1,7 +1,7 @@
- hosts: localhost
tasks:
- name: Delete VM
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
name: testvm
namespace: default
state: absent

View File

@@ -1,4 +1,4 @@
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- default

View File

@@ -1,7 +1,7 @@
# See https://docs.ansible.com/ansible/latest/dev_guide/collections_galaxy_meta.html
namespace: kubernetes
name: kubevirt
namespace: kubevirt
name: core
version: "0.1.0"
readme: README.md
authors:
@@ -20,10 +20,10 @@ tags:
- virtualization
- cloud
- infrastructure
repository: https://github.com/kubevirt/kubernetes.kubevirt
documentation: https://github.com/kubevirt/kubernetes.kubevirt/tree/main/docs
repository: https://github.com/kubevirt/kubevirt.core
documentation: https://github.com/kubevirt/kubevirt.core/tree/main/docs
homepage: https://kubevirt.io
issues: https://github.com/kubevirt/kubernetes.kubevirt/issues
issues: https://github.com/kubevirt/kubevirt.core/issues
build_ignore:
- .gitignore
- changelogs/.plugin-cache.yaml

View File

@@ -29,7 +29,7 @@ options:
plugin:
description: Token that ensures this is a source file for the "kubevirt" plugin.
required: True
choices: ["kubevirt", "kubernetes.kubevirt.kubevirt"]
choices: ["kubevirt", "kubevirt.core.kubevirt"]
host_format:
description:
- 'Specify the format of the host in the inventory group. Available specifiers: name, namespace, uid.'
@@ -127,7 +127,7 @@ EXAMPLES = """
# Filename must end with kubevirt.[yml|yaml]
# Authenticate with token, and return all VirtualMachineInstances for all accessible namespaces
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- host: https://192.168.64.4:8443
api_key: xxxxxxxxxxxxxxxx
@@ -135,7 +135,7 @@ connections:
# Use default config (~/.kube/config) file and active context, and return VirtualMachineInstances
# from namespace testing with interfaces connected to network bridge-network
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- testing
@@ -143,14 +143,14 @@ connections:
# Use default config (~/.kube/config) file and active context, and return VirtualMachineInstances
# from namespace testing with label app=test
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- testing
label_selector: app=test
# Use a custom config file, and a specific context.
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- kubeconfig: /path/to/config
context: 'awx/192-168-64-4:8443/developer'
@@ -231,7 +231,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
This class implements the actual inventory module.
"""
NAME = "kubernetes.kubevirt.kubevirt"
NAME = "kubevirt.core.kubevirt"
connection_plugin = "kubernetes.core.kubectl"
transport = "kubectl"

View File

@@ -114,7 +114,7 @@ requirements:
EXAMPLES = """
- name: Create a VirtualMachine
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
state: present
name: testvm
namespace: default
@@ -151,7 +151,7 @@ EXAMPLES = """
name: cloudinit
- name: Create a VirtualMachine with a DataVolume template
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
state: present
name: testvm-with-dv
namespace: default
@@ -191,7 +191,7 @@ EXAMPLES = """
wait: yes
- name: Delete a VirtualMachine
kubernetes.kubevirt.kubevirt_vm:
kubevirt.core.kubevirt_vm:
name: testvm
namespace: default
state: absent

View File

@@ -41,10 +41,10 @@ EOF
#################################################
# run the plugin second
export ANSIBLE_INVENTORY_ENABLED=kubernetes.kubevirt.kubevirt
export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt
cat << EOF > "$OUTPUT_DIR/test.kubevirt.yml"
plugin: kubernetes.kubevirt.kubevirt
plugin: kubevirt.core.kubevirt
connections:
- namespaces:
- default

View File

@@ -12,8 +12,8 @@ from unittest.mock import patch, ANY
from ansible.module_utils import basic
from ansible_collections.kubernetes.core.plugins.module_utils.k8s import runner
from ansible_collections.kubernetes.kubevirt.plugins.modules import kubevirt_vm
from ansible_collections.kubernetes.kubevirt.tests.unit.utils.ansible_module_mock import (
from ansible_collections.kubevirt.core.plugins.modules import kubevirt_vm
from ansible_collections.kubevirt.core.tests.unit.utils.ansible_module_mock import (
AnsibleFailJson,
AnsibleExitJson,
exit_json,