########################################################
to = ""
if machine_spec.keys():
- if all(k in machine_spec for k in ['host', 'user']):
- # Enlist an existing machine as a Juju unit
- machine = await model.add_machine(spec='ssh:{}@{}:{}'.format(
- machine_spec['user'],
- machine_spec['host'],
- self.GetPrivateKeyPath(),
- ))
+ if all(k in machine_spec for k in ['hostname', 'username']):
+ # Get the path to the previously generated ssh private key.
+ # Machines we're manually provisioned must have N2VC's public
+ # key injected, so if we don't have a keypair, raise an error.
+ private_key_path = ""
+
+ # Enlist the existing machine in Juju
+ machine = await self.model.add_machine(
+ spec='ssh:{}@{}:{}'.format(
+ specs['host'],
+ specs['user'],
+ private_key_path,
+ )
+ )
+ # Set the machine id that the deploy below will use.
to = machine.id
+ pass
#######################################
# Get the initial charm configuration #
# See the License for the specific language governing permissions and
# limitations under the License.
-from pathlib import Path
from setuptools import setup, find_packages
setup(
name='N2VC',
- version=0.1,
+ version_command=('git describe --match v* --tags --long --dirty',
+ 'pep440-git-full'),
packages=find_packages(
exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
install_requires=[
'paramiko',
],
include_package_data=True,
- maintainer='',
- maintainer_email='',
+ maintainer='Adam Israel',
+ maintainer_email='adam.israel@canonical.com',
description=(''),
url='',
license='Apache 2',